>>>>> "Ether" == Ether Jones <maxima at etherjones.us> writes:
Ether> when I run this script:
Ether> kil l(all)$
Ether> fpprec:32$
Ether> float2bf:false$
Ether> y: x/sin(x)-5281/5280$
Ether> bf_find_root(y,x,1/100,4/100);
Ether> I get several of these warnings:
Ether> bfloat: converting float 0.10000000000000001 to bigfloat.
Ether> Is there a way to format the problem so that I get true bigfloat precision?
Ok, I figured it out. There are a couple of places in the code with a
literal 0.5 and 0.1. 0.5 is harmless because it has an exact
representation in float and bigfloat. 0.1 is a problem since it's not
exactly representable. This is probably harmless since it's used in
deciding how many binary searches to use. (I think.)
These can easily be fixed by changing them to 1/2 and 1/10. I'll do
that soon.
That leaves just two places where these conversion appear. They come
from the $find_root_abs and $find_root_rel, which have default values
as floats. These are fairly harmless conversions.
So, in summary, all of the messages are pretty harmless and you should be
getting full bfloat accuracy, provided you set find_root_abs and
find_root_rel to the desired bfloat accuracy. (Currently, they
default to 0.0.)
There is one issue. If you set find_root_abs (or find_root_rel) to a
bigfloat, you will get some computations as a bigfloat but not
others. That's probably not desired, and find_root_abs and
find_root_rel should be converted to the appropriate type before
searching for the root.
Ray