|
486 | 486 |
|
487 | 487 | ## wide multiplication, Int128 multiply and divide ##
|
488 | 488 |
|
489 |
| -widemul(x::Union(Int8,Uint8,Int16), y::Union(Int8,Uint8,Int16)) = int32(x)*int32(y) |
490 |
| -widemul(x::Uint16, y::Uint16) = uint32(x)*uint32(y) |
491 |
| - |
492 |
| -widemul(x::Int32, y::Int32) = int64(x)*int64(y) |
493 |
| -widemul(x::Uint32, y::Uint32) = uint64(x)*uint64(y) |
494 |
| - |
495 |
| -widemul(x::Integer, y::Integer) = widemul(promote(x,y)...) |
496 |
| - |
497 | 489 | if WORD_SIZE==32
|
498 | 490 | function widemul(u::Int64, v::Int64)
|
499 | 491 | local u0::Uint64, v0::Uint64, w0::Uint64
|
@@ -564,9 +556,6 @@ if WORD_SIZE==32
|
564 | 556 | >>>(x::Int128, y::Int32) = y == 0 ? x : box(Int128,lshr_int(unbox(Int128,x),unbox(Int32,y)))
|
565 | 557 | >>>(x::Uint128, y::Int32) = y == 0 ? x : box(Uint128,lshr_int(unbox(Uint128,x),unbox(Int32,y)))
|
566 | 558 | else
|
567 |
| - widemul(u::Int64, v::Int64) = int128(u)*int128(v) |
568 |
| - widemul(u::Uint64, v::Uint64) = uint128(u)*uint128(v) |
569 |
| - |
570 | 559 | *(x::Int128, y::Int128) = box(Int128,mul_int(unbox(Int128,x),unbox(Int128,y)))
|
571 | 560 | *(x::Uint128, y::Uint128) = box(Uint128,mul_int(unbox(Uint128,x),unbox(Uint128,y)))
|
572 | 561 |
|
|
0 commit comments