(12C) Avoid Overflow and Underflow calculations - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C) Avoid Overflow and Underflow calculations (/thread-12763.html) |
(12C) Avoid Overflow and Underflow calculations - Gamo - 04-09-2019 06:06 AM Sometimes problems to solve for is very large or very small integers when doing arithmetic with very large and or very small integers it will give you the result of Error message. This very handy steps can help avoid this problem that can be calculate manually or by programming. ---------------------------------------------------------- To Multiply Large Numbers: a x b : LN(a) + LN(b) To Divide Large Numbers: a / b : LN(a) - LN(b) ----------------------------------------------------------- Here is the example if you need to solve for ab / cd Normal operation is (a x b) divided by (c x d) ----------------------------------------------------------- Example: 987 E90 x 987654321 / 789 E90 x 123456789 987 [EEX] 90 [ENTER] 987654321 [ENTER] 789 [EEX] 90 [ENTER] 123456789 [R/S] display 10.0076 // Assuming result in FIX 4 Answer: 10.0076 ----------------------------------------------------------- Program: For Very Large or Very Small Integer of ab / cd Code:
Gamo |