|
1 | 1 |
|
2 | 2 | module DecFP |
3 | 3 |
|
4 | | -import SpecialFunctions |
| 4 | +import Printf, SpecialFunctions |
5 | 5 |
|
6 | 6 | export Dec32, Dec64, Dec128, @d_str, @d32_str, @d64_str, @d128_str, exponent10, ldexp10 |
7 | 7 |
|
@@ -283,7 +283,7 @@ for w in (32,64,128) |
283 | 283 | return |
284 | 284 | end |
285 | 285 |
|
286 | | - function Base.Printf.fix_dec(x::$BID, n::Int, digits) |
| 286 | + function Printf.Printf.fix_dec(x::$BID, n::Int, digits) |
287 | 287 | if n > length(digits) - 1 |
288 | 288 | n = length(digits) - 1 |
289 | 289 | end |
@@ -324,7 +324,7 @@ for w in (32,64,128) |
324 | 324 | return Int32(len), Int32(pt), neg |
325 | 325 | end |
326 | 326 |
|
327 | | - function Base.Printf.ini_dec(x::$BID, n::Int, digits) |
| 327 | + function Printf.Printf.ini_dec(x::$BID, n::Int, digits) |
328 | 328 | if n > length(digits) - 1 |
329 | 329 | n = length(digits) - 1 |
330 | 330 | end |
@@ -353,8 +353,8 @@ for w in (32,64,128) |
353 | 353 | end |
354 | 354 |
|
355 | 355 | # 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()) |
358 | 358 |
|
359 | 359 | Base.fma(x::$BID, y::$BID, z::$BID) = nox(ccall(($(bidsym(w,"fma")), libbid), $BID, ($BID,$BID,$BID), x, y, z)) |
360 | 360 | Base.muladd(x::$BID, y::$BID, z::$BID) = fma(x,y,z) # faster than x+y*z |
|
0 commit comments