Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
Update some FIXMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
cespare committed Jan 13, 2019
1 parent 06e9fdf commit 390dcd6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions ryu.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import (

//go:generate go run maketables.go

// FIXME Optimizations:
// bits.Div

const (
mantBits32 = 23
expBits32 = 8
Expand Down
3 changes: 0 additions & 3 deletions ryu64.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ func (d dec64) append(b []byte, neg bool) []byte {
// so the rest will fit into a uint32.
var i int
if out>>32 > 0 {
// FIXME: bits.Div?
var out32 uint32
out, out32 = out/1e8, uint32(out%1e8)
for ; i < 8; i++ {
Expand Down Expand Up @@ -153,7 +152,6 @@ func float64ToDecimal(mant, exp uint64) dec64 {
)
if e2 >= 0 {
// This expression is slightly faster than max(0, log10Pow2(e2) - 1).
// FIXME: Confirm.
q := log10Pow2(e2) - boolToUint32(e2 > 3)
e10 = int32(q)
k := pow5InvNumBits64 + pow5Bits(int32(q)) - 1
Expand All @@ -180,7 +178,6 @@ func float64ToDecimal(mant, exp uint64) dec64 {
}
} else {
// This expression is slightly faster than max(0, log10Pow5(-e2) - 1).
// FIXME: confirm
q := log10Pow5(-e2) - boolToUint32(-e2 > 1)
e10 = int32(q) + e2
i := -e2 - int32(q)
Expand Down

0 comments on commit 390dcd6

Please sign in to comment.