Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,19 @@
writeln "operator"
writeln( (7131.5 ^ 10) ^/ 10 )
writeln 64 ^/ 6
writeln()
# To make the example from the D language work, we set a low maximum for the number of digits after a decimal point in division.
mode divMaxScale = 7
val .nthroot = f(.n, .A, .p) {
var .x = [.A, .A / .n]
while abs(.x[2]-.x[1]) > .p {
.x = [.x[2], ((.n-1) x .x[2] + .A / (.x[2] ^ (.n-1))) / .n]
}
simplify .x[2]
}
writeln "calculation"
writeln .nthroot(10, 7131.5 ^ 10, 0.001)
writeln .nthroot(6, 64, 0.001)