Infinity Constant In Modules

BlitzMax Forums/BlitzMax Programming/Infinity Constant In Modules

VIP3R(Posted 2006) [#1]
Is there any way of defining an infinity constant in modules?

The module source contains a constant of 99999.0^99999.0, but when compiled as a module it's converted to 1.#INF#

The 1.#INF# won't compile when using the above module giving a compiler error in the preprocessed .i file...

Compile Error: Invalid import identifier: '.'

Any solutions, other than defining the constant in every program that uses the module?


Chris C(Posted 2006) [#2]
I have a value for infinity (cant remember it off hand)
take a look at my ode stuff on my website


fredborg(Posted 2006) [#3]
I have a value for infinity
Hehe :)


Dreamora(Posted 2006) [#4]
You can calculate it with local old_i,i = 1 while i*2 > i i:*2;old_i = i wend local infinity = old_i


Difference(Posted 2006) [#5]
Check out http://www.blitzbasic.com/Community/posts.php?topic=55633 see if there's something you can use.


VIP3R(Posted 2006) [#6]
Thanks all :)

Chris yours did the trick, thanks.

Here's what works ok if anyone else needs it...

Const Infinity=3.40282347e+38


Chris C(Posted 2006) [#7]
see infinity really does have a value LOL