[TIB] Re: Integral Variables...


[Prev][Next][Index][Thread]

[TIB] Re: Integral Variables...



Hard to say.. I'd have to look at the function list of the manual. I'd have 
to say the regular plus, minus, and asterisk should work just fine, since 
they don't produce approximate numbers when given exact ones. The division 
symbol could be replaced with IntDiv() and mod() as needed.. and those 
functions should hold up just fine even if the data is in a matrix or list.

If you really want to avoid non-integer results I'd say avoid functions that 
end up with complicated or approximate results (like sin, ln, etc..)if you 
want to stay in integer math. The act of turning stuff to approximations and 
back to integers would only make things slower than keeping them as 
approximations, so if you plan to use them, I'd say just use them and don't 
worry about converting back until you think you're done with them.

Tavis

>
>(blinks)
>
>Will exact(int(x)) seriously work?
>
>I must test this.  Tomorrow, school, startTmr().  Or whatever that function 
>is.
>
>Woo for the new features.  Is there a certain operation that I should run 
>to use the arithmatic functions for the ints?  Like 2+1=3, all ints?  
>(Someone mentioned an intDiv() earlier...)
>


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




Follow-Ups: