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

Math structure #88

Closed
julianhyde opened this issue Nov 30, 2021 · 2 comments
Closed

Math structure #88

julianhyde opened this issue Nov 30, 2021 · 2 comments

Comments

@julianhyde
Copy link
Collaborator

Implement the "math" structure of the standard basis library. Per SML basis it has the following interface:

type real
val pi : real
val e : real
val sqrt : real -> real
val sin : real -> real
val cos : real -> real
val tan : real -> real
val asin : real -> real
val acos : real -> real
val atan : real -> real
val atan2 : real * real -> real
val exp : real -> real
val pow : real * real -> real
val ln    : real -> real
val log10 : real -> real
val sinh : real -> real
val cosh : real -> real
val tanh : real -> real

Example use:

Math.ln 1.0;
val it = 0.0 : real;
@julianhyde
Copy link
Collaborator Author

@julianhyde
Copy link
Collaborator Author

Fixed in ff42775.

In the previous commit a2e20dd, we started on the Real structure (supporting floating point arithmetic), adding constants Real.posInf and Real.negInf. More of the Real structure will follow shortly.

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

No branches or pull requests

1 participant