[PD-dev] [float infinity] and [float -infinity]
Hans-Christoph Steiner
hans at eds.org
Sat Jan 28 18:51:53 CET 2006
You might notice, I am doing some math these days ;). I just had
another idea for a handy thing when doing math: a method of getting the
smallest and largest possible numbers. Basically, the Pd version of a
#define INFINITY 1e37 (or whatever it is).
I think it would be handy to have as part of [float], like this:
[float infinity] and [float -infinity] (FLT_MAX and FLT_MIN)
or maybe:
[float max] and [float min] (FLT_MAX and FLT_MIN)
Other float.h defines would also be handy to have access to:
http://www.gnu.org/software/libc/manual/html_node/Floating-Point-
Parameters.html
Something like this:
[float max_exp] (FLT_MAX_EXP)
[float min_exp] (FLT_MIN_EXP)
And perhaps [int] could also have the relevant versions of the same
too. I guess that would just be:
[int infinity] and [int -infinity]
or maybe:
[int max] and [int min]
I don't think I'll have time to code this any time soon, but I can put
it into feature requests...
.hc
________________________________________________________________________
____
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously.
- Benjamin Franklin
More information about the Pd-dev
mailing list