From 2c2c33b2c5efe16b87d4e495f8994f6fac5807fe Mon Sep 17 00:00:00 2001 From: John M Kuhn Date: Sat, 19 Oct 2019 19:38:29 -0400 Subject: [PATCH] Printf reorg / add Project.toml --- .gitignore | 1 + Project.toml | 19 +++++++++++++++++++ REQUIRE | 3 --- src/DecFP.jl | 10 +++++----- 4 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 Project.toml delete mode 100644 REQUIRE diff --git a/.gitignore b/.gitignore index 9bf08d5..f22bc20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.jl.cov *.jl.mem +Manifest.toml deps/IntelRDFPMathLib* deps/installed_vers deps/libbid*.* diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..7d06b69 --- /dev/null +++ b/Project.toml @@ -0,0 +1,19 @@ +name = "DecFP" +uuid = "55939f99-70c6-5e9b-8bb0-5071ed7d61fd" +version = "0.4.8" + +[deps] +BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" + +[compat] +julia = "≥ 0.7.0" + +[extras] +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test", "Printf"] diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index 90b4f6d..0000000 --- a/REQUIRE +++ /dev/null @@ -1,3 +0,0 @@ -julia 0.7 -BinaryProvider -SpecialFunctions diff --git a/src/DecFP.jl b/src/DecFP.jl index 3a65a6e..9a65750 100644 --- a/src/DecFP.jl +++ b/src/DecFP.jl @@ -1,7 +1,7 @@ module DecFP -import SpecialFunctions +import Printf, SpecialFunctions export Dec32, Dec64, Dec128, @d_str, @d32_str, @d64_str, @d128_str, exponent10, ldexp10 @@ -283,7 +283,7 @@ for w in (32,64,128) return end - function Base.Printf.fix_dec(x::$BID, n::Int, digits) + function Printf.Printf.fix_dec(x::$BID, n::Int, digits) if n > length(digits) - 1 n = length(digits) - 1 end @@ -324,7 +324,7 @@ for w in (32,64,128) return Int32(len), Int32(pt), neg end - function Base.Printf.ini_dec(x::$BID, n::Int, digits) + function Printf.Printf.ini_dec(x::$BID, n::Int, digits) if n > length(digits) - 1 n = length(digits) - 1 end @@ -353,8 +353,8 @@ for w in (32,64,128) end # compatibility with julia#30373 - Base.Printf.fix_dec(x::$BID, n::Int) = Base.Printf.fix_dec(x, n, getdigitsbuf()) - Base.Printf.ini_dec(x::$BID, n::Int) = Base.Printf.ini_dec(x, n, getdigitsbuf()) + Printf.Printf.fix_dec(x::$BID, n::Int) = Printf.Printf.fix_dec(x, n, getdigitsbuf()) + Printf.Printf.ini_dec(x::$BID, n::Int) = Printf.Printf.ini_dec(x, n, getdigitsbuf()) Base.fma(x::$BID, y::$BID, z::$BID) = nox(ccall(($(bidsym(w,"fma")), libbid), $BID, ($BID,$BID,$BID), x, y, z)) Base.muladd(x::$BID, y::$BID, z::$BID) = fma(x,y,z) # faster than x+y*z