18 lines
402 B
Text
18 lines
402 B
Text
[ $ "bigrat.qky" loadfile ] now!
|
|
|
|
[ temp put
|
|
[ 2over 2over temp share approx=
|
|
iff 2drop done
|
|
2over 2over v*
|
|
temp share vsqrt drop
|
|
dip [ dip [ v+ 2 n->v v/ ] ]
|
|
again ]
|
|
base share temp take ** round ] is agm ( n/d n/d n --> n/d )
|
|
|
|
1 n->v
|
|
2 n->v 125 vsqrt drop 1/v
|
|
125 agm
|
|
2dup
|
|
125 point$ echo$ cr cr
|
|
swap say "Num: " echo cr
|
|
say "Den: " echo
|