RosettaCodeData/Task/Trabb-Pardo-Knuth-algorithm/Symsyn/trabb-pardo-knuth-algorithm.symsyn

38 lines
361 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
|Trabb PardoKnuth algorithm
a : 11 0
i
if i LE 10
[] $s
~ $s w
w a.i
+ i
goif
endif
10 i
if i GE 0
call f
if x GT 400
'too large' $s
else
~ x $s
endif
~ i $r
+ ' ' $r
+ $r $s.1
$s []
- i
goif
endif
stop
f a.i t
* t t x
* x t x
* 5 x
abs t
sqrt t y
+ y x
return