[ 
https://issues.apache.org/jira/browse/NUMBERS-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162337#comment-17162337
 ] 

Mohammad Rezaei commented on NUMBERS-148:
-----------------------------------------

Simplex has very serious issues with *small* numbers (e.g. 1e-20), let alone 
subnormals. There is a settable "epsilon" value (defaults to 1e-6), but even 
setting that doesn't really help with small numbers, because the rest of the 
matrix has relatively large numbers (1 and -1), which when 
dividing/subtracting, simply blow away the small numbers.

The scaling in MATH-1549 brings the range of solvable problems quite a bit 
forward, so long as all the inputs are in some way scalable. For example, if 
the input has 1e-20 and 1e20, it can't do anything.

Because of the subtraction heavy algorithm, it's best to think about the number 
of digits in the mantissa, which for a double is roughly 15-17, and if we want 
to converge on a good solution to 6 or so digits, that effectively means 
Simplex can only deal with numbers that are within 10 or so orders of magnitude.

TL;DR: the concerns are valid for general stuff, but don't affect Simplex 
because other issues will dominate first.

> Extract double exponent manipulation routines from commons-math to numbers
> --------------------------------------------------------------------------
>
>                 Key: NUMBERS-148
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-148
>             Project: Commons Numbers
>          Issue Type: Improvement
>          Components: core
>            Reporter: Mohammad Rezaei
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to