Hickerson series of almost integers: Difference between revisions

Content added Content deleted
(Addition of Fōrmulæ language)
Line 1,257: Line 1,257:
# Failed test '130370767029135900.458'
# Failed test '130370767029135900.458'
# at hickerson line 8</pre>
# at hickerson line 8</pre>

=={{header|Phix}}==
<lang Phix>include bigatom.e
bigatom ln2 = ba_log(2),
hn = ba_divide(0.5,ln2)
for n=1 to 17 do
hn = ba_divide(ba_multiply(n,hn),ln2)
string n10 = ba_sprintf("%24.4aB ",hn)
n10 &= iff(find(n10[21],"09")?"Y":"N")
printf(1,"%2d:%s\n",{n,n10})
end for</lang>
{{out}}
<pre>
1: 1.0407 Y
2: 3.0028 Y
3: 12.9963 Y
4: 74.9987 Y
5: 541.0015 Y
6: 4683.0012 Y
7: 47292.9987 Y
8: 545834.9979 Y
9: 7087261.0016 Y
10: 102247563.0053 Y
11: 1622632572.9976 Y
12: 28091567594.9816 Y
13: 526858348381.0012 Y
14: 10641342970443.0845 Y
15: 230283190977853.0374 Y
16: 5315654681981354.5131 N
17: 130370767029135900.4580 N
</pre>


=={{header|PL/I}}==
=={{header|PL/I}}==