Skip to content
Back to formatted view

Raw Message

Message-ID: <20040323181007.CA72E1043D@slim.kubism.ku.dk>
Date: 2004-03-23T19:10:14Z
From: terra@diku.dk
Subject: pgeom accuracy (PR#6687)

Full_Name: M. Welinder
Version: 1.6.2 and 1.8.1
OS: Solaris
Submission from: (NULL) (65.213.85.223)


The common lower_tail==TRUE && log_p==FALSE case can be improved as

  if (lower_tail && !log_p)
    return -expm1 ((x + 1) * log1p (-p));

This improves precision when p is very small and x not too big by
avoiding two problematic "1-sth" calculations.