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

Fix Issue 3632 - modify float is float to do a bitwise compare #1499

Closed
wants to merge 1 commit into from

Conversation

yebblies
Copy link
Member

Currently floating point types are the only types where 'is' is not a bitwise comparison. This patch makes floating is floating perform a bitwise comparison, at runtime and compile-time.

http://d.puremagic.com/issues/show_bug.cgi?id=3632

@denis-sh
Copy link
Contributor

What is the state of this ("hopefully last") pull which fails tests now?

@yebblies
Copy link
Member Author

Doesn't work.

@yebblies
Copy link
Member Author

This now works, except that this code T46!(double.nan) + T46!(-double.nan); generates two different template instances with the same mangled name. (which the win64 linker can't handle)

Not sure what to do here. Mangle each NaN differently? Make all NaNs the same at compile time? Thanks to real.init, we have a way to create at least two different NaNs at compile time.

@yebblies yebblies self-assigned this Jul 28, 2014
@andralex
Copy link
Member

I think each NaN should mangle differently. Applications are known to place useful data in NaNs' payload, which is well defined.

Currently floating point types are the only types where 'is' is not a bitwise comparison. This patch make floating is floating perform a bitwise comparison, at runtime and compile-time.
@ibuclaw
Copy link
Member

ibuclaw commented Dec 31, 2017

Rebased in #7568

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