> is bigger than < is bigger than yours.

Roman Thilenius's icon

the comparison operators sometimes drive me mad.

not only they dont support float, the do not
support negatives values either. argh! :)

good bye binops, hello expr.

-110 [R.I.P here lies Dr. Comparison Binop]

Emmanuel Jourdan's icon
Chris Muir's icon

At 12:50 AM -0600 7/18/07, Roman Thilenius wrote:
>the comparison operators sometimes drive me mad.
>
>not only they dont support float, the do not
>support negatives values either. argh! :)

As far as I know, both those statements are incorrect. Like all objects you have to give them a float argument for them to deal with floats.

-C

--
Chris Muir | "There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue." - Brian Eno

Roman Thilenius's icon

eh yea, with floats yes - i was looking at an old patch where i used it wrong.

but negative?

Max Patch
Copy patch and select New From Clipboard in Max.

i get an error message (and always got one), with both
the if expression and the binop objects.

Roman Thilenius's icon

oh lol, look what i typed in the messagebox last night. :)

Mattijs's icon

There is a space between - and 2147483648, seems that's the problem, it'll be recognized as a list.

Best,
Mattijs

Emmanuel Jourdan's icon

On 18 juil. 07, at 15:46, Roman Thilenius wrote:

> i get an error message (and always got one), with both
> the if expression and the binop objects.

I don't get that error. By the way, as far as I remember 21474836478
doesn't exist in 32 bits (2^31 - 1, does).

ej

Peter Castine's icon

Quote: Emmanuel Jourdan wrote on Wed, 18 July 2007 17:16
----------------------------------------------------
> On 18 juil. 07, at 15:46, Roman Thilenius wrote:
>
> > i get an error message (and always got one), with both
> > the if expression and the binop objects.
>
> I don't get that error. By the way, as far as I remember 21474836478
> doesn't exist in 32 bits (2^31 - 1, does).
----------------------------------------------------

-(2^31) is the smallest negative value for 32-bit integers. But the decimal point makes it a float. The scanf() parser (which one assumes Max is using) will properly parse '-21474836478.' (provided there is no space between the minus sign and the first digit). But floating point only has 24-bit precision, leaving you with something like -2.14748e10. This may be the source of some more surprises in Roman's patch.

Roman Thilenius's icon

> -(2^31) is the smallest negative value for 32-bit integers. But the decimal point makes it a float. The scanf() parser (which one assumes Max is using) will properly parse '-21474836478.' (provided there is no space between the minus sign and the first digit). But floating point only has 24-bit precision, leaving you with something like -2.14748e10. This may be the source of some more surprises in Roman's patch.
----------------------------------------------------

haha i dont care about the last few digits
behind the comma but of course you are right.

its just that before i reset my gates to "100000" i rather
reset them to "21474836478."
(so that they work with 150000, too)