Skip to content

add support for quadruple precision floating point #13415

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

Merged
merged 1 commit into from
Apr 23, 2014
Merged

add support for quadruple precision floating point #13415

merged 1 commit into from
Apr 23, 2014

Conversation

thestinger
Copy link
Contributor

This currently requires linking against a library like libquadmath (or
libgcc), because compiler-rt barely has any support for this and most
hardware does not yet have 128-bit precision floating point. For this
reason, it's currently hidden behind a feature gate.

When compiler-rt is updated to trunk, some tests can be added for
constant evaluation since there will be support for the comparison
operators.

Closes #13381

@huonw
Copy link
Member

huonw commented Apr 10, 2014

I'm in favour, but I would guess a change like this is theoretically meant to go through an RFC. (That said, since it's small change & is feature gated, I would personally be ok with merging and then going through an RFC to un-feature-gate.)

@alexcrichton
Copy link
Member

I'm a little worried about adding a new primitive type to the language without an RFC and without any documentation. The implementation seems ok with me, but this is quite a change to the language which hasn't had much discussion.

@thestinger
Copy link
Contributor Author

It has actually been discussed a long time ago since it was Graydon's reason for having float in the language (it was going to be f128 on architectures with hardware support for it). I didn't make an RFC simply because it doesn't seem very controversial and will need to be feature gated for other reasons anyway. I can close this and make an RFC if you think that's necessary.

@alexcrichton
Copy link
Member

We decided in today's meeting to move forward with this, r=me with a rebase.

@alexcrichton
Copy link
Member

Or no, before merging, I had one concern. This feature is enabled in libstd, and looks like it's only used by the visitor. By enabling this feature, are we pulling in runtime support which may not be available on all platforms? (my worry is just libstd, not f128 usage in general)

@thestinger
Copy link
Contributor Author

@alexcrichton: No runtime support is required to enable it in libstd and define some stuff like constants in an f128 module. Runtime support starts being required when the non-constant operators are used, as that will call into compiler-rt/libgcc_s.

At the moment, compiler-rt only has portable implementations of the comparison operators. I don't think any change needing more than those will make it through the OS X and Android bots.

@alexcrichton
Copy link
Member

OK, sounds good to me!

This currently requires linking against a library like libquadmath (or
libgcc), because compiler-rt barely has any support for this and most
hardware does not yet have 128-bit precision floating point. For this
reason, it's currently hidden behind a feature gate.

When compiler-rt is updated to trunk, some tests can be added for
constant evaluation since there will be support for the comparison
operators.

Closes #13381
bors added a commit that referenced this pull request Apr 23, 2014
This currently requires linking against a library like libquadmath (or
libgcc), because compiler-rt barely has any support for this and most
hardware does not yet have 128-bit precision floating point. For this
reason, it's currently hidden behind a feature gate.

When compiler-rt is updated to trunk, some tests can be added for
constant evaluation since there will be support for the comparison
operators.

Closes #13381
@bors bors closed this Apr 23, 2014
@bors bors merged commit dc7d7d2 into rust-lang:master Apr 23, 2014
@thestinger thestinger deleted the f128 branch April 23, 2014 05:27
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
…lip1995

End my vacation

r? `@ghost`
changelog: none
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

Successfully merging this pull request may close these issues.

add a feature-gated f128 type
4 participants