|
Boost Users : |
Subject: Re: [Boost-users] math tools roots
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2011-10-11 04:34:57
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf
Of
> Jonathan Franklin
> Sent: Monday, October 10, 2011 11:37 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] math tools roots
>
> On Mon, Oct 10, 2011 at 2:51 PM, Jerry <jerry_jeremiah_at_[hidden]> 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_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net