Evaluate Expressions

pliroforikos

Active Member
Licensed User
Can anyone explain log output?

B4X:
Log(5/0)                             'Show Infinity
Log(5/0 > 2)                       'Show  True
Log(2.2 > 3 And 5/0 > 2)    'Show False
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Log(5/0)  'Infinity
Log(-5/0) '-Infinity               
Log(Sqrt(-1)) 'NaN (not a number)
Log(5/0 > 2)  'True            
Log(2.2 > 3 And 5/0 > 2) 'False
The underlying Java types system supports +infinity and -infinity for doubles.

So a positive number divided by zero will return +infinity.
It is larger than 0 to Log(5 / 0 > 2) returns true
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…