[REBOL] Re: Math (division)
From: larry:ecotope at: 30-May-2001 19:38
Hi Ammon
If you just want to know if it is a REBOL integer:
integer? x
If you want to know if a number has no digits after the decimal place (i.e.,
it is an integer in the mathematical sense), regardless of its REBOL type:
>> math-int: func [x [number!]][x // 1 = 0]
>> math-int pi
== false
>> x: to-decimal 2
== 2
>> type? x
== decimal!
>> math-int x
== true
>> type? 2 ** 52
== decimal!
>> math-int 2 ** 52
== true
>> math-int -2 ** 52
== true
HTH
-Larry
----- Original Message -----
From: "Ammon Cooke" <[ammoncooke--yahoo--com]>
To: <[rebol-list--rebol--com]>
Sent: Wednesday, May 30, 2001 4:38 AM
Subject: [REBOL] Math (division)
I know there is a way to tell is a number is non-decimal, I just don't know
the way! ;)) Could someone please help me??
Your help is appreciated.
Ammon