Skip to content

Commit

Permalink
shadowed missing implementation of gcd_big_int
Browse files Browse the repository at this point in the history
  • Loading branch information
domasin committed Jul 15, 2013
1 parent feb5549 commit c8ec7bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion NHol/lib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright 1998 University of Cambridge
Copyright 1998-2007 John Harrison
Copyright 2013 Jack Pappas, Anh-Dung Phan, Eric Taucher
Copyright 2013 Jack Pappas, Anh-Dung Phan, Eric Taucher, Domenico Masini
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -595,6 +595,10 @@ let numerator = fst << numdom
/// Returns denominator of rational number in canonical form.
let denominator = snd << numdom

module Big_int =
let inline gcd_big_int (a : System.Numerics.BigInteger) (b : System.Numerics.BigInteger) : System.Numerics.BigInteger =
System.Numerics.BigInteger.GreatestCommonDivisor(a,b)

/// Computes greatest common divisor of two unlimited-precision integers.
let gcd_num n1 n2 = num_of_big_int(Big_int.gcd_big_int (big_int_of_num n1) (big_int_of_num n2))

Expand Down

0 comments on commit c8ec7bc

Please sign in to comment.