Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkDecimalConversion (0.18 sec)

  1. src/math/big/decimal_test.go

    		d.init(x, 0)
    		d.roundUp(test.n)
    		if got := d.String(); got != test.up {
    			t.Errorf("roundUp(%d, %d) = %s; want %s", test.x, test.n, got, test.up)
    		}
    	}
    }
    
    var sink string
    
    func BenchmarkDecimalConversion(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		for shift := -100; shift <= +100; shift++ {
    			var d decimal
    			d.init(natOne, shift)
    			sink = d.String()
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 05:54:35 UTC 2016
    - 3.3K bytes
    - Viewed (0)
Back to top