Home

>In comp.lang.c++

Actually, it was five different newsgroups (although comp.lang.c++
was one of the five). I have reduced it to just two here.

>Luna Moon <lunamoonmoon@gmail.com> wrote:
>> Here is one function in Matlab that I am having difficulty with
>> translating:
>>
>> isfinite(x)

In article <5ired3F3pi424U2@mid.dfncis.de>
Thomas Richter <thor@math.tu-berlin.de> wrote:
>C99: isinf(x)

This is the wrong test: it checks to see if x is infinite (+Infinity
or -Infinity).

C99 already has an isfinite(), so presumably the original poster
does not have a C99 compiler available.

It can be difficult to write isfinite() on some machines -- those
where (a) you pretty much have to do it in assembly, and (b) an
attempt to pass a "NaN-like" value causes a trap before you can
get to the assembly code in the first place -- but for most modern
IEEE machines, you can write isfinite() yourself if you have to.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.

previous
next

RE: newbie: self.member syntax seems /really/ annoying
Bug in execfile?
STL algorithms and output iterators
Re: Is the wxPython list down?
Re: Would u explain this code about template and class
Kidprotect
Rodzic Po Ludzku
Fundacja Hobbit
Fundacja Avalon
Nasze Dzieci