internal_test.go 618 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2009 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // export access to strconv internals for tests
  5. package strconv
  6. func NewDecimal(i uint64) *decimal {
  7. d := new(decimal)
  8. d.Assign(i)
  9. return d
  10. }
  11. func SetOptimize(b bool) bool {
  12. old := optimize
  13. optimize = b
  14. return old
  15. }
  16. func ParseFloatPrefix(s string, bitSize int) (float64, int, error) {
  17. return parseFloatPrefix(s, bitSize)
  18. }
  19. func MulByLog2Log10(x int) int {
  20. return mulByLog2Log10(x)
  21. }
  22. func MulByLog10Log2(x int) int {
  23. return mulByLog10Log2(x)
  24. }