javascript - toExponential() on Infinity number -


i'm trying first 7-8 numbers after digit on number infinity.

i.e. console.log((4^3)/(3^3)); result in infinity while real result 2.370370370.... want number in 2.370370370e+-60 form.

i tried make result.toexponential(8); no effects far. tips/answers appreciated.

in javascript, exponentiation made math.pow function. there no inline operator ^ (as in python **).

you should instead compute

math.pow(4, 3) / math.pow(3, 3) 

a part that,

you computing (4 xor 3) / (3 xor 3), evaluates 7 / 0, infinity.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -