Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pynac.pyx use double precision special functions instead of long double #8847

Closed
mwhansen opened this issue May 3, 2010 · 13 comments
Closed

Comments

@mwhansen
Copy link
Contributor

mwhansen commented May 3, 2010

Many systems such as cygwin don't have the long double version. Plus, they are being applied to floats/doubles so the extra precision doesn't buy much.

Component: porting: Cygwin

Keywords: pynac

Author: Mike Hansen

Reviewer: Burcin Erocal, Mike Hansen, William Stein

Merged: sage-4.4.3.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8847

@mwhansen
Copy link
Contributor Author

mwhansen commented May 3, 2010

Attachment: trac_8847.patch.gz

@burcin
Copy link

burcin commented May 5, 2010

Reviewer: Burcin Erocal

@burcin
Copy link

burcin commented May 5, 2010

comment:2

This gives the following doctest failures on my 64-bit T9300 Core 2 Duo laptop, with gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4 and glibc-2.10.1. I have no idea what is relevant, so I give some random information. :)

**********************************************************************
File "/home/burcin/sage/sage-4.4.1.alpha2-patched/devel/sage-t/sage/functions/other.py", line 428:
    sage: gamma1(float(6))
Expected:
    120.0
Got:
    119.99999999999997
**********************************************************************
**********************************************************************
File "/home/burcin/sage/sage-4.4.1.alpha2-patched/devel/sage-t/sage/symbolic/expression.pyx", line 5318:
    sage: SR(10.0r).gamma()
Expected:
    362880.0
Got:
    362880.00000000047
**********************************************************************

@burcin
Copy link

burcin commented May 5, 2010

Changed keywords from none to pynac

@burcin burcin added this to the sage-4.4.2 milestone May 5, 2010
@mwhansen
Copy link
Contributor Author

mwhansen commented May 5, 2010

comment:3

It'd be nice if we could just do like an ifdef in Cython.

@burcin
Copy link

burcin commented May 5, 2010

comment:4

We can put the ifdef in c_lib/include/ginac_wrapper.h to define the long double versions on Cygwin. Initially, they could just wrap the double precision functions.

@williamstein
Copy link
Contributor

comment:5

I just did something at runtime using a bint. It's very simple, and will have a very minimal performance hit.

@williamstein
Copy link
Contributor

apply only this (not the one below)

@williamstein
Copy link
Contributor

Attachment: trac_8847-take2.patch.gz

Attachment: trac_8847-take3.patch.gz

@mwhansen
Copy link
Contributor Author

Attachment: trac_8847-take4.patch.gz

@williamstein
Copy link
Contributor

Merged: 4.4.3.alpha0

@williamstein
Copy link
Contributor

Changed reviewer from Burcin Erocal to Burcin Erocal, Mike Hansen, William Stein

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented May 27, 2010

Changed merged from 4.4.3.alpha0 to sage-4.4.3.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants