Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleTrunc (0.09 sec)

  1. src/math/example_test.go

    	// 2.00
    	// 0.12
    }
    
    func ExampleExpm1() {
    	fmt.Printf("%.6f\n", math.Expm1(0.01))
    	fmt.Printf("%.6f\n", math.Expm1(-1))
    	// Output:
    	// 0.010050
    	// -0.632121
    }
    
    func ExampleTrunc() {
    	fmt.Printf("%.2f\n", math.Trunc(math.Pi))
    	fmt.Printf("%.2f\n", math.Trunc(-1.2345))
    	// Output:
    	// 3.00
    	// -1.00
    }
    
    func ExampleCbrt() {
    	fmt.Printf("%.2f\n", math.Cbrt(8))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:09:53 UTC 2021
    - 3.7K bytes
    - Viewed (0)
Back to top