Micro Focus QTP (UFT) Forums

Full Version: Fatorial of 12345.(Five digits)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Friends,
I need a small help..from u i wrote a script for factorial program but it is accepting up-to 170 numbers i.e it is giving up to 170!.
i want the factorial of some high range like 4 to 5 digits.it is not accepting and saying overflow error..can u guys please help me in this situation in quick time.
Why on earth do you want the factorial of 4 to 5 digits? I hope you understand that 170! is a monstrous number?
Anyways, coming to the technical part;
This is 170!
7.2574156153079989673967282111292631147169916812964513765... × 10^306 while 171! is this number 1.2410180702176678234248405241031039926166055775016931853... × 10^309

if you notice the first one contains 306 digits in the exponent and the latter contains 309. Your machine an handle 308 digits in the exponent and hence you can't go beyond that value.

Read more about Computer Number Format here