##- # Author: Brian Tiffin # Dedicated to the public domain # # Date started: December, 2016 # Modified: 2016-12-22/02:11-0500 ##+ # # patho.icn, Pathological problems with floating point # From RosettaCode # link printf procedure main() iterations := [3,4,5,6,7,8,20,30,50,100,200] every n := !iterations do { ans := patho(n, 2.0, -4.0) printf("%3d %19.15r\n", n, ans) } end # this sequence should converge on 6.0 procedure patho(n, a, v) if n < 3 then return v return patho(n -:= 1, v, 111-1130/v+3000/(v*a)) end