ncw / gmp

Go language interface to GMP - GNU Multiprecision Library (golang)
BSD 3-Clause "New" or "Revised" License
117 stars 26 forks source link

binomial fatal error #14

Open nathanhack opened 2 years ago

nathanhack commented 2 years ago

I tried to use Binomial but it blows up with:

fatal error: unexpected signal during runtime execution
[signal SIGFPE: floating-point exception code=0xfffffffffffffffa addr=0x3e900066a79 pc=0x7fa8e46aa8b2]

when running the following:

package main

import (
    "github.com/ncw/gmp"
)

func main() {
    new(gmp.Int).Binomial(12, 3)
}

On a Fedora box running gmp version 6.2.0

As a side question would it be possible to update the repo to use mpz_bin_ui instead? It looks like there has been a huge speed up for binomials in the latest version for 6.1.*>.