[42S] MANT Challenge
|
01-22-2014, 07:53 PM
(This post was last modified: 01-22-2014 08:01 PM by Dieter.)
Post: #9
|
|||
|
|||
RE: [42S] MANT Challenge
(01-22-2014 09:40 AM)Werner Wrote: A few borderline cases that may foil your first attempts (on a real 42S, not Free42): The problem are values with a mantissa > 9,99999999988 or even > 9,99999998844 (near the end of the working range). Here the log10 will be rounded up to the next higher integer. So the idea is to divide by the next lower power of ten (which also handles cases < 0,1) and add a final adjustment if the result is beyond 10 (which is true for most cases > 1). The only left problem are values very close to the lower working limit (1E-499). Here the log10 may be returned as -499 so that a division by 10^-500 would result. This case is handled separately. Code: 01 ABS What about this one? Any errors or problematic values? At least my 35s handles all test cases correctly. And also all others I tried. Is this a solution or am I missing something? Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)