Jump to content

Simple Answer


Ganbree

Recommended Posts

In a simple script im dividing to very differant numbers,
problem come from the exponents it can create:

$var1 = $num1 / $num2 * 0.01; // 0.01 is a constant answer = 8.14947503631E-06

if($var1 < 0) {$var1 = 0;}

problem...
$var1 still equals 8.14947503631E-06
is a exponent stored as a string and is being compared to 0,
i couldnt find a is_exp or is_expo / is_exponant etc...

Link to comment
https://forums.phpfreaks.com/topic/34024-simple-answer/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.