diff options
author | 2022-05-02 14:05:18 +0100 | |
---|---|---|
committer | 2022-05-02 15:05:18 +0200 | |
commit | b56dae8120d43b9acd3d3ed4d40100ffab7b972a (patch) | |
tree | d55d30589d8a8499ed3d5eecba163abc9fa78c27 /vendor/github.com/ugorji/go/codec/decimal.go | |
parent | add extra indexes as a migration (#527) (diff) | |
download | gotosocial-b56dae8120d43b9acd3d3ed4d40100ffab7b972a.tar.xz |
[chore] Update all but bun libraries (#526)
* update all but bun libraries
Signed-off-by: kim <grufwub@gmail.com>
* remove my personal build script changes
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/ugorji/go/codec/decimal.go')
-rw-r--r-- | vendor/github.com/ugorji/go/codec/decimal.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/ugorji/go/codec/decimal.go b/vendor/github.com/ugorji/go/codec/decimal.go index 6b617f5a9..dbb338049 100644 --- a/vendor/github.com/ugorji/go/codec/decimal.go +++ b/vendor/github.com/ugorji/go/codec/decimal.go @@ -132,12 +132,20 @@ var fi64 = floatinfo{52, 22, 15, false, 1<<52 - 1} var fi64u = floatinfo{0, 19, 0, true, fUint64Cutoff} func noFrac64(fbits uint64) bool { + if fbits == 0 { + return true + } + exp := uint64(fbits>>52)&0x7FF - 1023 // uint(x>>shift)&mask - bias // clear top 12+e bits, the integer part; if the rest is 0, then no fraction. return exp < 52 && fbits<<(12+exp) == 0 // means there's no fractional part } func noFrac32(fbits uint32) bool { + if fbits == 0 { + return true + } + exp := uint32(fbits>>23)&0xFF - 127 // uint(x>>shift)&mask - bias // clear top 9+e bits, the integer part; if the rest is 0, then no fraction. return exp < 23 && fbits<<(9+exp) == 0 // means there's no fractional part |