tx · AG7BYyXbzFoAAwTSSoS6nLeStXq55svKGMF49TuSGqgs 3N7hFU6dFSFKGGwDyF9WJ1jVsrB9w8RHT37: -0.01000000 Waves 2023.03.17 14:03 [2493909] smart account 3N7hFU6dFSFKGGwDyF9WJ1jVsrB9w8RHT37 > SELF 0.00000000 Waves
{ "type": 13, "id": "AG7BYyXbzFoAAwTSSoS6nLeStXq55svKGMF49TuSGqgs", "fee": 1000000, "feeAssetId": null, "timestamp": 1679051041261, "version": 2, "chainId": 84, "sender": "3N7hFU6dFSFKGGwDyF9WJ1jVsrB9w8RHT37", "senderPublicKey": "J6bcbr8r9usSLYw72NzzrKVCvKDDLe1uDx8bnWp3uFAV", "proofs": [ "5gQ2swyZJbaH88MvcwkG6dZQTqxPfRdSRqkmehj5Kqj5gKodfRbZK1GmhMZ6t6QegDGnfNXDNUWQiXCgmntvQbWm" ], "script": "base64:BgIHCAISAwoBCAIAB01VTFQxOFgJAKcDAQITMTAwMDAwMDAwMDAwMDAwMDAwMAAERTE4WAkApwMBAhMyNzE4MjgxODI4NDU5MDQ1MjM1AQFpAQVnYW1tYQEEelN0cgQDejE4CQCnAwEFBHpTdHIKAQVjaGFpbgIDYWNjAWkJALgCAgkAtwICBQN6MTgJALkCAgkAtgIBCQBlAgkAZAIFAWkFAWkAAQUHTVVMVDE4WAkAvAIDCQC5AgIJALYCAQkAaAIFAWkFAWkFB01VTFQxOFgFB01VTFQxOFgFA2FjYwQBZgoAAiRsCQDMCAIAFAkAzAgCABMJAMwIAgASCQDMCAIAEQkAzAgCABAJAMwIAgAPCQDMCAIADgkAzAgCAA0JAMwIAgAMCQDMCAIACwkAzAgCAAoJAMwIAgAJCQDMCAIACAkAzAgCAAcJAMwIAgAGCQDMCAIABQkAzAgCAAQJAMwIAgADCQDMCAIAAgkAzAgCAAEFA25pbAoAAiRzCQCQAwEFAiRsCgAFJGFjYzAFB01VTFQxOFgKAQUkZjBfMQICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkBBWNoYWluAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAyMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQJAJQKAgUDbmlsCQCmAwEJALwCAwkAdgYFBEUxOFgAEgkAvgIBBQN6MTgAEgASBQZIQUxGVVAFB01VTFQxOFgFAWYAC2Z7UQ==", "height": 2493909, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9zwvXQe9vrUWVLXWhRBHsuYTrzpzXtrRL1EfnQbYsQwv Next: 6zK6RvLbiRZvALH9AvRih6AafosnAV1XYARcQMm7BC3C Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | func chain (acc,i) = ((z18 + (toBigInt(((i + i) - 1)) * MULT18X)) - fraction((toBigInt((i * i)) * MULT18X), MULT18X, acc)) | |
12 | 12 | ||
13 | 13 | let f = { | |
14 | - | let $l = [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] | |
14 | + | let $l = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] | |
15 | 15 | let $s = size($l) | |
16 | 16 | let $acc0 = MULT18X | |
17 | 17 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
20 | 20 | ||
21 | 21 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
22 | 22 | then $a | |
23 | - | else throw("List size exceeds | |
23 | + | else throw("List size exceeds 20") | |
24 | 24 | ||
25 | - | $f0_2 | |
25 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
26 | 26 | } | |
27 | 27 | $Tuple2(nil, toString(fraction(pow(E18X, 18, -(z18), 18, 18, HALFUP), MULT18X, f))) | |
28 | 28 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let MULT18X = parseBigIntValue("1000000000000000000") | |
5 | 5 | ||
6 | 6 | let E18X = parseBigIntValue("2718281828459045235") | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func gamma (zStr) = { | |
10 | 10 | let z18 = parseBigIntValue(zStr) | |
11 | 11 | func chain (acc,i) = ((z18 + (toBigInt(((i + i) - 1)) * MULT18X)) - fraction((toBigInt((i * i)) * MULT18X), MULT18X, acc)) | |
12 | 12 | ||
13 | 13 | let f = { | |
14 | - | let $l = [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] | |
14 | + | let $l = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1] | |
15 | 15 | let $s = size($l) | |
16 | 16 | let $acc0 = MULT18X | |
17 | 17 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
18 | 18 | then $a | |
19 | 19 | else chain($a, $l[$i]) | |
20 | 20 | ||
21 | 21 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
22 | 22 | then $a | |
23 | - | else throw("List size exceeds | |
23 | + | else throw("List size exceeds 20") | |
24 | 24 | ||
25 | - | $f0_2 | |
25 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
26 | 26 | } | |
27 | 27 | $Tuple2(nil, toString(fraction(pow(E18X, 18, -(z18), 18, 18, HALFUP), MULT18X, f))) | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 |
github/deemru/w8io/026f985 47.84 ms ◑