Topic: singularity problems


Author: clamage@eng.sun.com (Steve Clamage)
Date: 1999/09/16
Raw View
"wee" <weeseng@cyberway.com.sg> writes:

>I got a problem with the log function in the math.h that displays a sing
>error:>singularity error.

>how is the singularity error trigger?

"Singularity error" isn't mentioned in the C++ standard. I'd guess
that you've hit the mathematical singularity of the log function
by asking for the log of zero.

--
Steve Clamage, stephen.clamage@sun.com


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "wee" <weeseng@cyberway.com.sg>
Date: 1999/09/15
Raw View
I got a problem with the log function in the math.h that displays a sing
error:>singularity error.

how is the singularity error trigger?




[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: James Kuyper <kuyper@wizard.net>
Date: 1999/09/16
Raw View
wee wrote:
>
> I got a problem with the log function in the math.h that displays a sing
> error:>singularity error.
>
> how is the singularity error trigger?

This newsgroup is for discussing standardization issue, not
implementation-specific programming questions.

There is a singularity of the log() function at log(0.0) - is that what
you're doing? And of course, for real-valued log functions, you can't
take the log(x) for x<0.0 either.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]