Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
exp2 approx
fabiang@fabiang-pc:~$ rlwrap -A sollya-6.0/sollya
> f = 2^x;
> d = [0,1];
> p = fpminimax(f, 5, [|single...|], d, relative, floating);
> p;
0.999999940395355224609375 + x * (0.693152725696563720703125 + x * (0.2401557266712188720703125 + x * (5.58212064206600189208984375e-2 + x * (8.994684554636478424072265625e-3 + x * 1.875563524663448333740234375e-3))))
> supnorm(p,f,d,relative,2^(-40));
[7.6368451118469238177852423430871540641073913491255e-8;7.6368451118536524357599936913965179697532925267748e-8]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment