> is bigger than < is bigger than yours.

Jul 18, 2007 at 6:50am

> is bigger than < is bigger than yours.

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]

#32928
Jul 18, 2007 at 7:32am

#109026
Jul 18, 2007 at 7:38am

#109027
Jul 18, 2007 at 7:52am

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

#109028
Jul 18, 2007 at 1:46pm

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

but negative?

max v2;
#N vpatcher 142 466 625 718;
#P message 251 55 88 196617 – 2147483648.;
#P flonum 202 55 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 202 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 202 91 59 196617 > 0.;
#P message 88 55 88 196617 2147483648.;
#P flonum 39 55 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 39 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 39 91 59 196617 > 0.;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 3 0 0 1;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P connect 7 0 4 1;
#P pop;

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

#109029
Jul 18, 2007 at 1:49pm

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

#109030
Jul 18, 2007 at 1:51pm

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

Best,
Mattijs

#109031
Jul 18, 2007 at 3:16pm

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

#109032
Jul 19, 2007 at 10:33pm

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.

#109033
Jul 20, 2007 at 8:03am

> -(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)

#109034

You must be logged in to reply to this topic.