octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36607] norminv doesn't work for very small va


From: anonymous
Subject: [Octave-bug-tracker] [bug #36607] norminv doesn't work for very small values
Date: Thu, 07 Jun 2012 19:30:10 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0

Follow-up Comment #2, bug #36607 (project octave):

In Matlab, I get:


erfinv (-1 + [1e-16 1e-17 1e-18 1e-19 1e-20])
ans = -5.8639      -Inf      -Inf      -Inf      -Inf

norminv ([1e-16 1e-17 1e-18 1e-19 1e-20])
ans = -8.2221   -8.4938   -8.7573   -9.0133   -9.2623


norminv can also be calculated using erfcinv, as 


norminv = - sqrt (2) * erfcinv (2 * x);


which avoids the subtraction you mention.

Unfortunately, base Octave doesn't implement erfcinv, while the one
implemented in specfun simply defines it in terms of erfinv, hence it
recreates the aforementioned problem.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36607>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]