Cipolla's algorithm: Difference between revisions
Content added Content deleted
m (→{{header|Factor}}: remove vocab) |
(→{{header|Wren}}: Point class now generated at runtime by new Wren-dynamic module.) |
||
Line 2,253: | Line 2,253: | ||
{{trans|Kotlin}} |
{{trans|Kotlin}} |
||
{{libheader|Wren-big}} |
{{libheader|Wren-big}} |
||
{{libheader|Wren-dynamic}} |
|||
<lang ecmascript>import "/big" for BigInt |
<lang ecmascript>import "/big" for BigInt |
||
import "/dynamic" for Tuple |
|||
var Point = Tuple.create("Point", ["x", "y"]) |
|||
class Point { |
|||
construct new(x, y) { |
|||
_x = x |
|||
_y = y |
|||
} |
|||
x { _x } |
|||
y { _y } |
|||
toString { "(%(x), %(y))" } |
|||
} |
|||
var bigBig = BigInt.ten.pow(50) + BigInt.new(151) |
var bigBig = BigInt.ten.pow(50) + BigInt.new(151) |
||