Hey everyone,
I've noticed a disagreement between the documentation and implementation of
mnewton() wrt newtonepsilon. describe(newtonepsilon) says that its default
value should be 10.0^(-fpprec/2), but the actual default value in mnewton.mac
is 10.0^(-16/2) -- seemingly using the default value of fpprec.
Unfortunately this detail is a little more complicated than just changing the
16 to fpprec. fpprec is for bigfloats, but mnewton() won't use bigfloats
unless newtonepsilon actually is a bigfloat. So simply changing this would
mean using precision based on fpprec when only using regular floats.
I've attached two short, mutually exclusive patches:
* Simply change the 16 to fpprec in the default value of newtonepsilon to
agree with the documentation
* Update the documentation to agree with the (already) hardcoded default value
of 10.0^(-8) for newtonepsilon
I imagine the latter patch would be desired to preserve the use of floats by
default and to avoid accidentally requesting high precision via fpprec while
using only regular floats. I think this patch covers all of the places where
fpprec/2 is mentioned.
I think it would be neat to have newtonepsilon default to something based on
fpprec, but I think something more elaborate than the former patch would be
required to (safely) have this support both floats and bigfloats. I don't
know how much desire there even is for that, so I'm mainly attaching this in
case any discussion comes about.
Let me know what you think.
Cheers,
Kris Katterjohn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnewton-fpprec.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20121216/f650fd63/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnewton-doc.patch
Type: text/x-patch
Size: 1051 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20121216/f650fd63/attachment-0003.bin>