Contact: aviboots(AT)netvision.net.il
39,870 questions
51,793 answers
573 users
import math n = (100.0 ** 100) * (100.0 ** 100) print(n) # NaN = "not a number" print('isnan(n) =', math.isnan(n)) ''' run: inf isnan(n) = False '''
import math n = 100 print(n) # NaN = "not a number" print('isnan(n) =', math.isnan(n)) ''' run: 100 isnan(n) = False '''
import math n = math.pi print(n) # NaN = "not a number" print('isnan(n) =', math.isnan(n)) ''' run: 3.141592653589793 isnan(n) = False '''
import math n = (100.0 ** 100) * (100.0 ** 100) x = n / n print('n / n =', n / n) # NaN = "not a number" print('isnan(x) =', math.isnan(x)) ''' run: n / n = nan isnan(x) = True '''