-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Jonathan Franklin Sent: Monday, October 10, 2011 11:37 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] math tools roots
On Mon, Oct 10, 2011 at 2:51 PM, Jerry
wrote: Another way of looking at it is to use L'Hopital's rule:
0/x is not an indeterminate form, so you can't apply l'Hopital's rule. If fact, there is no need since 0/x = 0 for all x != 0.
Whoa - I fear you mathematicians are getting over-excited! This is C++ and floating-point and NaN (with arbitrary definitions of behaviour). Entirely different rules apply! A more interesting question might be how to avoid going round the loop too many times when a and b are getting so near to zero that they are becoming ill-defined in the floating-point type in use. But let's not go there now ;-) Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com