Notifications
Clear all

[Closed] 1399508779607-1399508769673=0?how to fix it?

Hi,
A very simple question,I don’t know how?

1399508779607-1399508769673

result=0
or

1399508779607 as float-1399508769673 as float

result=0.0

how can I get the real result 9934?

7 Replies
1399508779607 == 1399508769673

true

(1399508779607 as float) == (1399508769673 as float)

true

1399508779607L - 1399508769673L

9934L

1 Reply
(@momo2012)
Joined: 11 months ago

Posts: 0

Thanks too much,it works

1399508779607L – 1399508769673L

“L” is great,it hacks the limitation of number vaild range,but I look through maxscript reference can’t find where “L” come from.

1 as Integer64

Me too, can’t find anywhere.

 lo1

It’s not hack, and it has a range of its own, which is at maximum 9,223,372,036,854,775,807.
It’s the 64 bit integer type, (c# long or c++ long long).

Thanks guys, I found the detail in “64 Bit Values – Double, Integer64, IntegerPtr” of maxscript reference,
and I knew there are three way to solve 1399508779607 – 1399508769673

1399508779607L – 1399508769673L
9934L
1399508779607d0 – 1399508769673d0
9934.0d0
1399508779607P – 1399508769673P
9934P

but how to use these ways in maxscript,I mearn
(1399508779607 as Integer64) – (1399508769673 as Integer64)
0L
(1399508779607 as IntegerPtr) – (1399508769673 as IntegerPtr)
0P
(1399508779607 as Double) – (1399508769673 as Double)
0.0d0
it seems 64 Bit Values still has limitation like integer or float.
Thanks for help!