[Patches] acosh and asinh functions
Nadav Horesh
NadavH@envision.co.il
Wed, 26 Apr 2000 21:44:54 +0200
This is a multi-part message in MIME format.
--------------30186664822EB8C794609C59
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The computation of the inverse hyperbolic functions 'acosh' and 'asinh'
is erroneous -- it has both low precision and discontinuities.
The patch (using diff) is followed:
====================================================================
60,61c60,63
< return c_log(c_sum(x,c_prod(c_i,
< c_sqrt(c_diff(c_1,c_prod(x,x))))));
---
> Py_complex z;
> z = c_sqrt(c_half);
> c_temp = c_log(c_prod(z, c_sum( c_sqrt(c_sum(x,c_1)),
c_sqrt(c_diff(x,c_1)))));
> return c_sum(c_temp,c_temp);
89,90c91
< z = c_diff(c_sqrt(z),x);
< return c_neg(c_log(z));
---
> return c_log(c_sum(c_sqrt(z),x));
338c339
< PyErr_SetFromErrno(PyExc_ValueError);
---
> PyErr_SetFromErrno(PyExc_ValueError);
414c415
<
---
>
422c423
< }
---
> }
\ No newline at end of file
=================================================================
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties
under
copyright, patent or other rights or interests
("claims"). To
the extent that I have any such claims, I hereby grant
to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide
license to
reproduce, distribute, perform and/or display
publicly, prepare
derivative versions, and otherwise use this
contribution as part
of the Python software and its related documentation,
or any
derivative versions thereof, at no cost to CNRI or its
licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion,
decide
whether or not to incorporate this contribution in the
Python
software and its related documentation. I further
grant CNRI
permission to use my name and other identifying
information
provided to CNRI by me for use in connection with the
Python
software and its related documentation.
--------------30186664822EB8C794609C59
Content-Type: text/x-vcard; charset=us-ascii;
name="NadavH.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Nadav Horesh
Content-Disposition: attachment;
filename="NadavH.vcf"
begin:vcard
n:Horesh;Nadav
tel;fax:03 9244335
tel;home:03 9314679
tel;work:03 9244339
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:NadavH@Envision.com
fn:Nadav Horesh
end:vcard
--------------30186664822EB8C794609C59--