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

Introduce Math.frexp method. #4560

Merged
merged 2 commits into from Jun 13, 2017
Merged

Conversation

akzhan
Copy link
Contributor

@akzhan akzhan commented Jun 13, 2017

PS: It may be used by Float64.hash (to solve #3932).

PS: It may be used by Float64.hash (to solve crystal-lang#3932).
@Sija
Copy link
Contributor

Sija commented Jun 13, 2017

@akzhan 32-bit on linux failed with Invalid memory access (signal 11) at address 0x1f8dbcf8, just FYI.

@asterite
Copy link
Member

@Sija It's a bug because of LLVM 3.5

@Sija
Copy link
Contributor

Sija commented Jun 13, 2017

@asterite
Copy link
Member

Ah, well. Then there's something wrong with how we are using LLVM but unfortunately I have no idea why. Probably something gets disposed and still being used.

@RX14
Copy link
Contributor

RX14 commented Jun 13, 2017

Doesn't mean the compiler was compiled using LLVM 3.8 @Sija.

@asterite
Copy link
Member

@RX14 Ah, that's probably it. At least on my machine, where I have the compiler compiled with 4.0, I never got that error. In any case it's a minor issue because it only affects the compiler, randomly, but not the executables produced by the compiler.

@asterite asterite merged commit 68b1e62 into crystal-lang:master Jun 13, 2017
@asterite asterite added this to the Next milestone Jun 13, 2017
@akzhan akzhan deleted the introduce_math_frexp branch June 13, 2017 19:07
@akzhan
Copy link
Contributor Author

akzhan commented Jun 15, 2017

@asterite Compiler works fine on LLVM 3.9 and 4.0. Looks like it failed or earlier LLVMs.

akzhan added a commit to akzhan/crystal that referenced this pull request Jul 1, 2017
akzhan added a commit to akzhan/crystal that referenced this pull request Aug 4, 2017
RX14 pushed a commit that referenced this pull request Sep 1, 2017
* Additions to Big arithmetics.
Follows #4560.

* Follow @RX14 review (single line blocks, extract mantissa bits constants).

* Int cast is implicit here.

* Format src/big/big_rational.cr

* BigRational is not float, and frexp should be not used on it.

* frexp should not be used on BigInt.

* rework BigFloat./

* rename bsi, bfsi, bsf, bfsf etc. in spec.

* rework def BigFloat.<=>(other : Int)

* Simplify a bit, thanks to @RX14

* just remove commen. looks like single Number constructor looks OK in every case.

* more verbose naming for used variables.

* just explanation of workaround, refs #4897

* For now overloads work (i don't know why).

* dedup

* Forward declarations of Big Arithmentics types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants