Jump to content

Cipolla's algorithm: Difference between revisions

→‎{{header|Wren}}: Point class now generated at runtime by new Wren-dynamic module.
m (→‎{{header|Factor}}: remove vocab)
(→‎{{header|Wren}}: Point class now generated at runtime by new Wren-dynamic module.)
Line 2,253:
{{trans|Kotlin}}
{{libheader|Wren-big}}
{{libheader|Wren-dynamic}}
<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)
 
9,490

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.