2 ms·
Thanks for your code post, but your fused-multiply-add Horner coeffs seem like they are not from the same power series I was discussing / the article was promot
by cb321 2y ago
Thanks for your code post, but your fused-multiply-add Horner coeffs seem like they are not from the same power series I was discussing / the article was promoting.
The effects I mention are pretty clear if you run my code with both `x = 2/3.0` and with `x = math.sqrt(0.5)`, even with a much smaller `m` / coarser granularity.
For example { for the python &| copy-paste impaired &| lazy :-) }:
$ python3 j.py | headtail 3 3 # [2/3..4/3], m=300
0.6666666666666666 3.7747748309890916e-06
0.6688888888888889 3.5668329603222304e-06
0.6711111111111111 3.3693446750415745e-06
---
1.3266666666666544 -3.120628879194065e-07
1.3288888888888766 -3.2510972441945896e-07
1.3311111111110987 -3.3859621345611046e-07
$ python3 k.py | headtail 3 3 # [rt1/2..rt2], m=300
0.7071067811865476 1.279804798859363e-06
0.7094638037905028 1.19727672415193e-06
0.711820826394458 1.1195756742798935e-06
---
1.4071424945612245 -1.1572535666970474e-06
1.4094995171651796 -1.1970089550117358e-06
1.4118565397691347 -1.2378520898859158e-06
Note in the 2/3..4/3 case the exponent changes from e-06 to e-07 - a whole order of magnitude difference in |error|, while in the rt1/2..rt2 case the nearness of |error|. This same pattern manifests for higher numbers of terms like 8 or 9 or higher resolution like m=3840.