Skip to content

Commit 2c2c33b

Browse files
committed
Printf reorg / add Project.toml
1 parent 58325fe commit 2c2c33b

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.jl.cov
22
*.jl.mem
3+
Manifest.toml
34
deps/IntelRDFPMathLib*
45
deps/installed_vers
56
deps/libbid*.*

Project.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name = "DecFP"
2+
uuid = "55939f99-70c6-5e9b-8bb0-5071ed7d61fd"
3+
version = "0.4.8"
4+
5+
[deps]
6+
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
7+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
8+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
9+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
10+
11+
[compat]
12+
julia = "≥ 0.7.0"
13+
14+
[extras]
15+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
16+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
17+
18+
[targets]
19+
test = ["Test", "Printf"]

REQUIRE

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/DecFP.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
module DecFP
33

4-
import SpecialFunctions
4+
import Printf, SpecialFunctions
55

66
export Dec32, Dec64, Dec128, @d_str, @d32_str, @d64_str, @d128_str, exponent10, ldexp10
77

@@ -283,7 +283,7 @@ for w in (32,64,128)
283283
return
284284
end
285285

286-
function Base.Printf.fix_dec(x::$BID, n::Int, digits)
286+
function Printf.Printf.fix_dec(x::$BID, n::Int, digits)
287287
if n > length(digits) - 1
288288
n = length(digits) - 1
289289
end
@@ -324,7 +324,7 @@ for w in (32,64,128)
324324
return Int32(len), Int32(pt), neg
325325
end
326326

327-
function Base.Printf.ini_dec(x::$BID, n::Int, digits)
327+
function Printf.Printf.ini_dec(x::$BID, n::Int, digits)
328328
if n > length(digits) - 1
329329
n = length(digits) - 1
330330
end
@@ -353,8 +353,8 @@ for w in (32,64,128)
353353
end
354354

355355
# compatibility with julia#30373
356-
Base.Printf.fix_dec(x::$BID, n::Int) = Base.Printf.fix_dec(x, n, getdigitsbuf())
357-
Base.Printf.ini_dec(x::$BID, n::Int) = Base.Printf.ini_dec(x, n, getdigitsbuf())
356+
Printf.Printf.fix_dec(x::$BID, n::Int) = Printf.Printf.fix_dec(x, n, getdigitsbuf())
357+
Printf.Printf.ini_dec(x::$BID, n::Int) = Printf.Printf.ini_dec(x, n, getdigitsbuf())
358358

359359
Base.fma(x::$BID, y::$BID, z::$BID) = nox(ccall(($(bidsym(w,"fma")), libbid), $BID, ($BID,$BID,$BID), x, y, z))
360360
Base.muladd(x::$BID, y::$BID, z::$BID) = fma(x,y,z) # faster than x+y*z

0 commit comments

Comments
 (0)