Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BenchmarkFloatAdd (0.31 sec)

  1. src/expvar/expvar_test.go

    		t.Errorf("reqs.String() = %q, want \"4.64\"", s)
    	}
    
    	reqs.Add(-2)
    	if v := reqs.Value(); v != 0.75 {
    		t.Errorf("reqs.Value() = %v, want 0.75", v)
    	}
    }
    
    func BenchmarkFloatAdd(b *testing.B) {
    	var f Float
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			f.Add(1.0)
    		}
    	})
    }
    
    func BenchmarkFloatSet(b *testing.B) {
    	var f Float
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  2. src/math/big/float_test.go

    					want = -1
    				case x > y:
    					want = +1
    				}
    				if got != want {
    					t.Errorf("(%g).Cmp(%g) = %v; want %v", x, y, got, want)
    				}
    			}
    		}
    	}
    }
    
    func BenchmarkFloatAdd(b *testing.B) {
    	x := new(Float)
    	y := new(Float)
    	z := new(Float)
    
    	for _, prec := range []uint{10, 1e2, 1e3, 1e4, 1e5} {
    		x.SetPrec(prec).SetRat(NewRat(1, 3))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 51.9K bytes
    - Viewed (0)
Back to top