-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add methods taking machine floats for Sinh
, Cosh
, Tanh
, Asinh
, Acosh
, Atanh
, CubeRoot
, Erf
, Gamma
#3986
Conversation
- A bunch of operations for floating point numbers had no implementation for machine floats, even though C99 provides suitable functions. - Most of the math functions we checked for in configure are actually guaranteed to be there by C99. The sole exception is exp10, which is a non-standard extension. - Add a bunch of super-trivial tests to ensure those new functions are actually callable. These are not good tests, just a bare minimum.
[ 0., 1. ] | ||
gap> Erf(0.); | ||
0. | ||
gap> #Zeta(0.); # TODO: not implemented for machine floats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually as far as I can tell, not even the float
package implements this, for any float type -- correct, @laurentbartholdi ?
So perhaps we should just remove this, there seems little value in keeping an operation with no methods around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I just followed the standard (I don't remember where I read it, though); so in my opinion it's best to leave it there, so as to reserve the word "Zeta".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laurentbartholdi could you please clarify which "standard" you are referring to here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fingolfin.
No, sorry :)
I just remember having looked up something and copied it into the file, but
can't locate it anymore. A quick Google search brings up
Library TR1 ISO/IEC TR 19768:2007, then published as an independent ISO
standard, ISO/IEC 29124:2010
which seems never to have been properly implemented, except perhaps in
C++17.
…On Mon, Apr 27, 2020, 11:18 Max Horn ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tst/testinstall/float.tst
<#3986 (comment)>:
> +0.
+gap> Square(0.);
+0.
+
+#
+gap> FrExp(0.);
+[ 0., 0 ]
+gap> LdExp(0.,0);
+0.
+gap> Norm(0.);
+0.
+gap> SinCos(0.);
+[ 0., 1. ]
+gap> Erf(0.);
+0.
+gap> #Zeta(0.); # TODO: not implemented for machine floats
@laurentbartholdi <https://github.com/laurentbartholdi> could you please
clarify which "standard" you are referring to here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3986 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARAQUDFSS3FBH22E75WKMTROVEXXANCNFSM4MQ7RZ3Q>
.
|
Well, C99 implements most of the functions you added to GAP, except for I looked a bit around and found no standard the includes zeta, other than indeed C++17 which seems to include everything and the kitchen sink, but that's not something we can reasonably aim for :-) |
Sinh
, Cosh
, Tanh
, Asinh
, Acosh
, Atanh
, CubeRoot
, Erf
, Gamma
)
Sinh
, Cosh
, Tanh
, Asinh
, Acosh
, Atanh
, CubeRoot
, Erf
, Gamma
)Sinh
, Cosh
, Tanh
, Asinh
, Acosh
, Atanh
, CubeRoot
, Erf
, Gamma
A bunch of operations for floating point numbers had no implementation for
machine floats, even though C99 provides suitable functions.
Most of the math functions we checked for in configure are actually
guaranteed to be there by C99. The sole exception is exp10, which is a
non-standard extension.
Add a bunch of super-trivial tests to ensure those new functions are
actually callable. These are not good tests, just a bare minimum.
Resolves #3983