Math Library
While the arithmetic and logic operators represent the basic operations that our [[CPU]] can perform, there are many other common math functions that com in handy. Since they are so common, programming languages usually have a math library that provides these functions. Logarithms, trigonometry and random number generation are just of few of the types of functions typically provided.
Math Constants
Math constants provide commonly used mathematical constanst to the highest precesion available. Some of the more useful math constants are summarized below.
Constant | Description |
---|
Math Functions
These most useful math functions are summarized below.
Function | Description |
---|
/****************************************************************************** * This program demonstrates the math library. * * Copyright © 2016 Richard Lesh. All rights reserved. *****************************************************************************/ use std::f64::consts; fn main() { let a:f64 = PI / f64::from(6); let b:f64 = PI / f64::from(4); let c:f64 = -a * 2; let d:f64 = -b * 2; let e:f64 = E; println!("{}", format!("pi = {0:f}", PI)); println!("{}", format!("e = {0:f}", E)); // abs, floor, ceil, round, trunc, min, max println!("{}", format!("abs({0:f}) = {1:f}", a, fabs(a))); println!("{}", format!("abs({0:f}) = {1:f}", c, fabs(c))); println!("{}", format!("floor({0:f}) = {1:f}", a, floor(a))); println!("{}", format!("floor({0:f}) = {1:f}", c, floor(c))); println!("{}", format!("ceil({0:f}) = {1:f}", a, ceil(a))); println!("{}", format!("ceil({0:f}) = {1:f}", c, ceil(c))); println!("{}", format!("round({0:f}) = {1:f}", a, round(a))); println!("{}", format!("round({0:f}) = {1:f}", c, round(c))); println!("{}", format!("trunc({0:f}) = {1:f}", a, trunc(a))); println!("{}", format!("trunc({0:f}) = {1:f}", c, trunc(c))); println!("{}", format!("min({0:f}, {1:f}) = {2:f}", a, c, fmin(a,c))); println!("{}", format!("max({0:f}, {1:f}) = {2:f}", a, c, fmax(a,c))); // sin, cos, tan, atan, atan2, acos, asin println!("{}", format!("sin({0:f}) = {1:f}", a, sin(a))); println!("{}", format!("sin({0:f}) = {1:f}", b, sin(b))); println!("{}", format!("sin({0:f}) = {1:f}", c, sin(c))); println!("{}", format!("sin({0:f}) = {1:f}", d, sin(d))); println!("{}", format!("cos({0:f}) = {1:f}", a, cos(a))); println!("{}", format!("cos({0:f}) = {1:f}", b, cos(b))); println!("{}", format!("cos({0:f}) = {1:f}", c, cos(c))); println!("{}", format!("cos({0:f}) = {1:f}", d, cos(d))); println!("{}", format!("tan({0:f}) = {1:f}", a, tan(a))); println!("{}", format!("tan({0:f}) = {1:f}", b, tan(b))); println!("{}", format!("tan({0:f}) = {1:f}", c, tan(c))); println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a)))); println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b)))); println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c)))); println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d)))); println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a)))); println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b)))); println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c)))); println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d)))); println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a)))); println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b)))); println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c)))); // 45 degrees println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64))); // 30 degrees println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64)))); // sinh, cosh, tanh, atanh, acosh, asinh println!("{}", format!("sinh({0:f}) = {1:f}", a, sinh(a))); println!("{}", format!("sinh({0:f}) = {1:f}", b, sinh(b))); println!("{}", format!("sinh({0:f}) = {1:f}", c, sinh(c))); println!("{}", format!("sinh({0:f}) = {1:f}", d, sinh(d))); println!("{}", format!("cosh({0:f}) = {1:f}", a, cosh(a))); println!("{}", format!("cosh({0:f}) = {1:f}", b, cosh(b))); println!("{}", format!("cosh({0:f}) = {1:f}", c, cosh(c))); println!("{}", format!("cosh({0:f}) = {1:f}", d, cosh(d))); println!("{}", format!("tanh({0:f}) = {1:f}", a, tanh(a))); println!("{}", format!("tanh({0:f}) = {1:f}", b, tanh(b))); println!("{}", format!("tanh({0:f}) = {1:f}", c, tanh(c))); println!("{}", format!("tanh({0:f}) = {1:f}", d, tanh(d))); println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a)))); println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b)))); println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c)))); println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d)))); println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a)))); println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b)))); println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c)))); println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d)))); println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a)))); println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b)))); println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c)))); println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d)))); // log, log10, exp, pow, sqrt println!("{}", format!("log({0:f}) = {1:f}", a, log(a))); println!("{}", format!("log({0:f}) = {1:f}", b, log(b))); println!("{}", format!("log({0:f}) = {1:f}", -c, log(-c))); println!("{}", format!("log({0:f}) = {1:f}", -d, log(-d))); println!("{}", format!("log({0:f}) = {1:f}", e, log(e))); println!("{}", format!("log10({0:f}) = {1:f}", a, log10(a))); println!("{}", format!("log10({0:f}) = {1:f}", b, log10(b))); println!("{}", format!("log10({0:f}) = {1:f}", -c, log10(-c))); println!("{}", format!("log10({0:f}) = {1:f}", -d, log10(-d))); println!("{}", format!("log10({0:f}) = {1:f}", e, log10(e))); println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, exp(0.5f64))); println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, exp(1.0f64))); println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, exp(2.0f64))); println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 0.5f64, pow(10.0f64,0.5f64))); println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 1.0f64, pow(10.0f64,1.0f64))); println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 2.0f64, pow(10.0f64,2.0f64))); println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, sqrt(0.5f64))); println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, sqrt(2.0f64))); println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, sqrt(10.0f64))); // random numbers println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); }
Output
$ rustc Math1.rs
error: unknown format trait `f`
--> Math1.rs:16:34
|
16 | println!("{}", format!("pi = {0:f}", PI));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:17:33
|
17 | println!("{}", format!("e = {0:f}", E));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:20:33
|
20 | println!("{}", format!("abs({0:f}) = {1:f}", a, fabs(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:20:42
|
20 | println!("{}", format!("abs({0:f}) = {1:f}", a, fabs(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:21:33
|
21 | println!("{}", format!("abs({0:f}) = {1:f}", c, fabs(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:21:42
|
21 | println!("{}", format!("abs({0:f}) = {1:f}", c, fabs(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:22:35
|
22 | println!("{}", format!("floor({0:f}) = {1:f}", a, floor(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:22:44
|
22 | println!("{}", format!("floor({0:f}) = {1:f}", a, floor(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:23:35
|
23 | println!("{}", format!("floor({0:f}) = {1:f}", c, floor(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:23:44
|
23 | println!("{}", format!("floor({0:f}) = {1:f}", c, floor(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:24:34
|
24 | println!("{}", format!("ceil({0:f}) = {1:f}", a, ceil(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:24:43
|
24 | println!("{}", format!("ceil({0:f}) = {1:f}", a, ceil(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:25:34
|
25 | println!("{}", format!("ceil({0:f}) = {1:f}", c, ceil(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:25:43
|
25 | println!("{}", format!("ceil({0:f}) = {1:f}", c, ceil(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:26:35
|
26 | println!("{}", format!("round({0:f}) = {1:f}", a, round(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:26:44
|
26 | println!("{}", format!("round({0:f}) = {1:f}", a, round(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:27:35
|
27 | println!("{}", format!("round({0:f}) = {1:f}", c, round(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:27:44
|
27 | println!("{}", format!("round({0:f}) = {1:f}", c, round(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:28:35
|
28 | println!("{}", format!("trunc({0:f}) = {1:f}", a, trunc(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:28:44
|
28 | println!("{}", format!("trunc({0:f}) = {1:f}", a, trunc(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:29:35
|
29 | println!("{}", format!("trunc({0:f}) = {1:f}", c, trunc(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:29:44
|
29 | println!("{}", format!("trunc({0:f}) = {1:f}", c, trunc(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:30:33
|
30 | println!("{}", format!("min({0:f}, {1:f}) = {2:f}", a, c, fmin(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:30:40
|
30 | println!("{}", format!("min({0:f}, {1:f}) = {2:f}", a, c, fmin(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:30:49
|
30 | println!("{}", format!("min({0:f}, {1:f}) = {2:f}", a, c, fmin(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:31:33
|
31 | println!("{}", format!("max({0:f}, {1:f}) = {2:f}", a, c, fmax(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:31:40
|
31 | println!("{}", format!("max({0:f}, {1:f}) = {2:f}", a, c, fmax(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:31:49
|
31 | println!("{}", format!("max({0:f}, {1:f}) = {2:f}", a, c, fmax(a,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:34:33
|
34 | println!("{}", format!("sin({0:f}) = {1:f}", a, sin(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:34:42
|
34 | println!("{}", format!("sin({0:f}) = {1:f}", a, sin(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:35:33
|
35 | println!("{}", format!("sin({0:f}) = {1:f}", b, sin(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:35:42
|
35 | println!("{}", format!("sin({0:f}) = {1:f}", b, sin(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:36:33
|
36 | println!("{}", format!("sin({0:f}) = {1:f}", c, sin(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:36:42
|
36 | println!("{}", format!("sin({0:f}) = {1:f}", c, sin(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:37:33
|
37 | println!("{}", format!("sin({0:f}) = {1:f}", d, sin(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:37:42
|
37 | println!("{}", format!("sin({0:f}) = {1:f}", d, sin(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:38:33
|
38 | println!("{}", format!("cos({0:f}) = {1:f}", a, cos(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:38:42
|
38 | println!("{}", format!("cos({0:f}) = {1:f}", a, cos(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:39:33
|
39 | println!("{}", format!("cos({0:f}) = {1:f}", b, cos(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:39:42
|
39 | println!("{}", format!("cos({0:f}) = {1:f}", b, cos(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:40:33
|
40 | println!("{}", format!("cos({0:f}) = {1:f}", c, cos(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:40:42
|
40 | println!("{}", format!("cos({0:f}) = {1:f}", c, cos(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:41:33
|
41 | println!("{}", format!("cos({0:f}) = {1:f}", d, cos(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:41:42
|
41 | println!("{}", format!("cos({0:f}) = {1:f}", d, cos(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:42:33
|
42 | println!("{}", format!("tan({0:f}) = {1:f}", a, tan(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:42:42
|
42 | println!("{}", format!("tan({0:f}) = {1:f}", a, tan(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:43:33
|
43 | println!("{}", format!("tan({0:f}) = {1:f}", b, tan(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:43:42
|
43 | println!("{}", format!("tan({0:f}) = {1:f}", b, tan(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:44:33
|
44 | println!("{}", format!("tan({0:f}) = {1:f}", c, tan(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:44:42
|
44 | println!("{}", format!("tan({0:f}) = {1:f}", c, tan(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:45:34
|
45 | println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:45:43
|
45 | println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:46:34
|
46 | println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:46:43
|
46 | println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:47:34
|
47 | println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:47:43
|
47 | println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:48:34
|
48 | println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:48:43
|
48 | println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:49:34
|
49 | println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:49:43
|
49 | println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:50:34
|
50 | println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:50:43
|
50 | println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:51:34
|
51 | println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:51:43
|
51 | println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:52:34
|
52 | println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:52:43
|
52 | println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:53:34
|
53 | println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:53:43
|
53 | println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:54:34
|
54 | println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:54:43
|
54 | println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:55:34
|
55 | println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:55:43
|
55 | println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:57:35
|
57 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:57:42
|
57 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:57:51
|
57 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:59:35
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:59:42
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:59:51
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:62:34
|
62 | println!("{}", format!("sinh({0:f}) = {1:f}", a, sinh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:62:43
|
62 | println!("{}", format!("sinh({0:f}) = {1:f}", a, sinh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:63:34
|
63 | println!("{}", format!("sinh({0:f}) = {1:f}", b, sinh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:63:43
|
63 | println!("{}", format!("sinh({0:f}) = {1:f}", b, sinh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:64:34
|
64 | println!("{}", format!("sinh({0:f}) = {1:f}", c, sinh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:64:43
|
64 | println!("{}", format!("sinh({0:f}) = {1:f}", c, sinh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:65:34
|
65 | println!("{}", format!("sinh({0:f}) = {1:f}", d, sinh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:65:43
|
65 | println!("{}", format!("sinh({0:f}) = {1:f}", d, sinh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:66:34
|
66 | println!("{}", format!("cosh({0:f}) = {1:f}", a, cosh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:66:43
|
66 | println!("{}", format!("cosh({0:f}) = {1:f}", a, cosh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:67:34
|
67 | println!("{}", format!("cosh({0:f}) = {1:f}", b, cosh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:67:43
|
67 | println!("{}", format!("cosh({0:f}) = {1:f}", b, cosh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:68:34
|
68 | println!("{}", format!("cosh({0:f}) = {1:f}", c, cosh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:68:43
|
68 | println!("{}", format!("cosh({0:f}) = {1:f}", c, cosh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:69:34
|
69 | println!("{}", format!("cosh({0:f}) = {1:f}", d, cosh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:69:43
|
69 | println!("{}", format!("cosh({0:f}) = {1:f}", d, cosh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:70:34
|
70 | println!("{}", format!("tanh({0:f}) = {1:f}", a, tanh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:70:43
|
70 | println!("{}", format!("tanh({0:f}) = {1:f}", a, tanh(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:71:34
|
71 | println!("{}", format!("tanh({0:f}) = {1:f}", b, tanh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:71:43
|
71 | println!("{}", format!("tanh({0:f}) = {1:f}", b, tanh(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:72:34
|
72 | println!("{}", format!("tanh({0:f}) = {1:f}", c, tanh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:72:43
|
72 | println!("{}", format!("tanh({0:f}) = {1:f}", c, tanh(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:73:34
|
73 | println!("{}", format!("tanh({0:f}) = {1:f}", d, tanh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:73:43
|
73 | println!("{}", format!("tanh({0:f}) = {1:f}", d, tanh(d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:74:35
|
74 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:74:44
|
74 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:75:35
|
75 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:75:44
|
75 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:76:35
|
76 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:76:44
|
76 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:77:35
|
77 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:77:44
|
77 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:78:35
|
78 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:78:44
|
78 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:79:35
|
79 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:79:44
|
79 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:80:35
|
80 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:80:44
|
80 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:81:35
|
81 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:81:44
|
81 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:82:35
|
82 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:82:44
|
82 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:83:35
|
83 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:83:44
|
83 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:84:35
|
84 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:84:44
|
84 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:85:35
|
85 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:85:44
|
85 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d))));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:88:33
|
88 | println!("{}", format!("log({0:f}) = {1:f}", a, log(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:88:42
|
88 | println!("{}", format!("log({0:f}) = {1:f}", a, log(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:89:33
|
89 | println!("{}", format!("log({0:f}) = {1:f}", b, log(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:89:42
|
89 | println!("{}", format!("log({0:f}) = {1:f}", b, log(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:90:33
|
90 | println!("{}", format!("log({0:f}) = {1:f}", -c, log(-c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:90:42
|
90 | println!("{}", format!("log({0:f}) = {1:f}", -c, log(-c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:91:33
|
91 | println!("{}", format!("log({0:f}) = {1:f}", -d, log(-d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:91:42
|
91 | println!("{}", format!("log({0:f}) = {1:f}", -d, log(-d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:92:33
|
92 | println!("{}", format!("log({0:f}) = {1:f}", e, log(e)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:92:42
|
92 | println!("{}", format!("log({0:f}) = {1:f}", e, log(e)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:93:35
|
93 | println!("{}", format!("log10({0:f}) = {1:f}", a, log10(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:93:44
|
93 | println!("{}", format!("log10({0:f}) = {1:f}", a, log10(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:94:35
|
94 | println!("{}", format!("log10({0:f}) = {1:f}", b, log10(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:94:44
|
94 | println!("{}", format!("log10({0:f}) = {1:f}", b, log10(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:95:35
|
95 | println!("{}", format!("log10({0:f}) = {1:f}", -c, log10(-c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:95:44
|
95 | println!("{}", format!("log10({0:f}) = {1:f}", -c, log10(-c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:96:35
|
96 | println!("{}", format!("log10({0:f}) = {1:f}", -d, log10(-d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:96:44
|
96 | println!("{}", format!("log10({0:f}) = {1:f}", -d, log10(-d)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:97:35
|
97 | println!("{}", format!("log10({0:f}) = {1:f}", e, log10(e)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:97:44
|
97 | println!("{}", format!("log10({0:f}) = {1:f}", e, log10(e)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:98:33
|
98 | println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, exp(0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:98:42
|
98 | println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, exp(0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:99:33
|
99 | println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, exp(1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:99:42
|
99 | println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, exp(1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:100:33
|
100 | println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, exp(2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:100:42
|
100 | println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, exp(2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:101:33
|
101 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 0.5f64, pow(10.0f64,0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:101:40
|
101 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 0.5f64, pow(10.0f64,0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:101:49
|
101 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 0.5f64, pow(10.0f64,0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:102:33
|
102 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 1.0f64, pow(10.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:102:40
|
102 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 1.0f64, pow(10.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:102:49
|
102 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 1.0f64, pow(10.0f64,1.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:103:33
|
103 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 2.0f64, pow(10.0f64,2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:103:40
|
103 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 2.0f64, pow(10.0f64,2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:103:49
|
103 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 2.0f64, pow(10.0f64,2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:104:34
|
104 | println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, sqrt(0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:104:43
|
104 | println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, sqrt(0.5f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:105:34
|
105 | println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, sqrt(2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:105:43
|
105 | println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, sqrt(2.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:106:34
|
106 | println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, sqrt(10.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:106:43
|
106 | println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, sqrt(10.0f64)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:109:40
|
109 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:110:40
|
110 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math1.rs:111:40
|
111 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `PI` in this scope
--> Math1.rs:10:14
|
10 | let a:f64 = PI / f64::from(6);
| ^^ not found in this scope
|
help: consider importing one of these items
|
7 + use consts::PI;
|
7 + use std::f32::consts::PI;
|
error[E0425]: cannot find value `PI` in this scope
--> Math1.rs:11:14
|
11 | let b:f64 = PI / f64::from(4);
| ^^ not found in this scope
|
help: consider importing one of these items
|
7 + use consts::PI;
|
7 + use std::f32::consts::PI;
|
error[E0425]: cannot find value `E` in this scope
--> Math1.rs:14:14
|
14 | let e:f64 = E;
| ^
|
help: a local variable with a similar name exists
|
14 | let e:f64 = a;
| ~
help: consider importing one of these items
|
7 + use consts::E;
|
7 + use std::f32::consts::E;
|
error[E0425]: cannot find value `PI` in this scope
--> Math1.rs:16:39
|
16 | println!("{}", format!("pi = {0:f}", PI));
| ^^ not found in this scope
|
help: consider importing one of these items
|
7 + use consts::PI;
|
7 + use std::f32::consts::PI;
|
error[E0425]: cannot find value `E` in this scope
--> Math1.rs:17:38
|
17 | println!("{}", format!("e = {0:f}", E));
| ^
|
help: a local variable with a similar name exists
|
17 | println!("{}", format!("e = {0:f}", e));
| ~
help: consider importing one of these items
|
7 + use consts::E;
|
7 + use std::f32::consts::E;
|
warning: unused import: `std::f64::consts`
--> Math1.rs:7:5
|
7 | use std::f64::consts;
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0425]: cannot find function `fabs` in this scope
--> Math1.rs:20:50
|
20 | println!("{}", format!("abs({0:f}) = {1:f}", a, fabs(a)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `fabs` in this scope
--> Math1.rs:21:50
|
21 | println!("{}", format!("abs({0:f}) = {1:f}", c, fabs(c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `floor` in this scope
--> Math1.rs:22:52
|
22 | println!("{}", format!("floor({0:f}) = {1:f}", a, floor(a)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `floor` in this scope
--> Math1.rs:23:52
|
23 | println!("{}", format!("floor({0:f}) = {1:f}", c, floor(c)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `ceil` in this scope
--> Math1.rs:24:51
|
24 | println!("{}", format!("ceil({0:f}) = {1:f}", a, ceil(a)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `ceil` in this scope
--> Math1.rs:25:51
|
25 | println!("{}", format!("ceil({0:f}) = {1:f}", c, ceil(c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `round` in this scope
--> Math1.rs:26:52
|
26 | println!("{}", format!("round({0:f}) = {1:f}", a, round(a)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `round` in this scope
--> Math1.rs:27:52
|
27 | println!("{}", format!("round({0:f}) = {1:f}", c, round(c)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `trunc` in this scope
--> Math1.rs:28:52
|
28 | println!("{}", format!("trunc({0:f}) = {1:f}", a, trunc(a)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `trunc` in this scope
--> Math1.rs:29:52
|
29 | println!("{}", format!("trunc({0:f}) = {1:f}", c, trunc(c)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `fmin` in this scope
--> Math1.rs:30:60
|
30 | println!("{}", format!("min({0:f}, {1:f}) = {2:f}", a, c, fmin(a,c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `fmax` in this scope
--> Math1.rs:31:60
|
31 | println!("{}", format!("max({0:f}, {1:f}) = {2:f}", a, c, fmax(a,c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:34:50
|
34 | println!("{}", format!("sin({0:f}) = {1:f}", a, sin(a)));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:35:50
|
35 | println!("{}", format!("sin({0:f}) = {1:f}", b, sin(b)));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:36:50
|
36 | println!("{}", format!("sin({0:f}) = {1:f}", c, sin(c)));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:37:50
|
37 | println!("{}", format!("sin({0:f}) = {1:f}", d, sin(d)));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:38:50
|
38 | println!("{}", format!("cos({0:f}) = {1:f}", a, cos(a)));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:39:50
|
39 | println!("{}", format!("cos({0:f}) = {1:f}", b, cos(b)));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:40:50
|
40 | println!("{}", format!("cos({0:f}) = {1:f}", c, cos(c)));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:41:50
|
41 | println!("{}", format!("cos({0:f}) = {1:f}", d, cos(d)));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:42:50
|
42 | println!("{}", format!("tan({0:f}) = {1:f}", a, tan(a)));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:43:50
|
43 | println!("{}", format!("tan({0:f}) = {1:f}", b, tan(b)));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:44:50
|
44 | println!("{}", format!("tan({0:f}) = {1:f}", c, tan(c)));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:45:48
|
45 | println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:45:61
|
45 | println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `asin` in this scope
--> Math1.rs:45:56
|
45 | println!("{}", format!("asin({0:f}) = {1:f}", sin(a), asin(sin(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:46:48
|
46 | println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:46:61
|
46 | println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `asin` in this scope
--> Math1.rs:46:56
|
46 | println!("{}", format!("asin({0:f}) = {1:f}", sin(b), asin(sin(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:47:48
|
47 | println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:47:61
|
47 | println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `asin` in this scope
--> Math1.rs:47:56
|
47 | println!("{}", format!("asin({0:f}) = {1:f}", sin(c), asin(sin(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:48:48
|
48 | println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d))));
| ^^^ not found in this scope
error[E0425]: cannot find function `sin` in this scope
--> Math1.rs:48:61
|
48 | println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d))));
| ^^^ not found in this scope
error[E0425]: cannot find function `asin` in this scope
--> Math1.rs:48:56
|
48 | println!("{}", format!("asin({0:f}) = {1:f}", sin(d), asin(sin(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:49:48
|
49 | println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:49:61
|
49 | println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `acos` in this scope
--> Math1.rs:49:56
|
49 | println!("{}", format!("acos({0:f}) = {1:f}", cos(a), acos(cos(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:50:48
|
50 | println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:50:61
|
50 | println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `acos` in this scope
--> Math1.rs:50:56
|
50 | println!("{}", format!("acos({0:f}) = {1:f}", cos(b), acos(cos(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:51:48
|
51 | println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:51:61
|
51 | println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `acos` in this scope
--> Math1.rs:51:56
|
51 | println!("{}", format!("acos({0:f}) = {1:f}", cos(c), acos(cos(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:52:48
|
52 | println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d))));
| ^^^ not found in this scope
error[E0425]: cannot find function `cos` in this scope
--> Math1.rs:52:61
|
52 | println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d))));
| ^^^ not found in this scope
error[E0425]: cannot find function `acos` in this scope
--> Math1.rs:52:56
|
52 | println!("{}", format!("acos({0:f}) = {1:f}", cos(d), acos(cos(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:53:48
|
53 | println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:53:61
|
53 | println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a))));
| ^^^ not found in this scope
error[E0425]: cannot find function `atan` in this scope
--> Math1.rs:53:56
|
53 | println!("{}", format!("atan({0:f}) = {1:f}", tan(a), atan(tan(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:54:48
|
54 | println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:54:61
|
54 | println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b))));
| ^^^ not found in this scope
error[E0425]: cannot find function `atan` in this scope
--> Math1.rs:54:56
|
54 | println!("{}", format!("atan({0:f}) = {1:f}", tan(b), atan(tan(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:55:48
|
55 | println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `tan` in this scope
--> Math1.rs:55:61
|
55 | println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c))));
| ^^^ not found in this scope
error[E0425]: cannot find function `atan` in this scope
--> Math1.rs:55:56
|
55 | println!("{}", format!("atan({0:f}) = {1:f}", tan(c), atan(tan(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `atan2` in this scope
--> Math1.rs:57:72
|
57 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64)));
| ^^^^^ not found in this scope
|
help: use the `.` operator to call the method `atan2` on `f64`
|
57 - println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, atan2(1.0f64,1.0f64)));
57 + println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 1.0f64, 1.0f64.atan2(1.0f64)));
|
error[E0425]: cannot find function `sqrt` in this scope
--> Math1.rs:59:64
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `sqrt` on `f64`
|
59 - println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
59 + println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, 3.0f64.sqrt(), atan2(1.0f64,sqrt(3.0f64))));
|
error[E0425]: cannot find function `sqrt` in this scope
--> Math1.rs:59:91
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `sqrt` on `f64`
|
59 - println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
59 + println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,3.0f64.sqrt())));
|
error[E0425]: cannot find function `atan2` in this scope
--> Math1.rs:59:78
|
59 | println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
| ^^^^^ not found in this scope
|
help: use the `.` operator to call the method `atan2` on `f64`
|
59 - println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), atan2(1.0f64,sqrt(3.0f64))));
59 + println!("{}", format!("atan2({0:f}, {1:f}) = {2:f}", 1.0f64, sqrt(3.0f64), 1.0f64.atan2(sqrt(3.0f64))));
|
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:62:51
|
62 | println!("{}", format!("sinh({0:f}) = {1:f}", a, sinh(a)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:63:51
|
63 | println!("{}", format!("sinh({0:f}) = {1:f}", b, sinh(b)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:64:51
|
64 | println!("{}", format!("sinh({0:f}) = {1:f}", c, sinh(c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:65:51
|
65 | println!("{}", format!("sinh({0:f}) = {1:f}", d, sinh(d)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:66:51
|
66 | println!("{}", format!("cosh({0:f}) = {1:f}", a, cosh(a)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:67:51
|
67 | println!("{}", format!("cosh({0:f}) = {1:f}", b, cosh(b)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:68:51
|
68 | println!("{}", format!("cosh({0:f}) = {1:f}", c, cosh(c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:69:51
|
69 | println!("{}", format!("cosh({0:f}) = {1:f}", d, cosh(d)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:70:51
|
70 | println!("{}", format!("tanh({0:f}) = {1:f}", a, tanh(a)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:71:51
|
71 | println!("{}", format!("tanh({0:f}) = {1:f}", b, tanh(b)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:72:51
|
72 | println!("{}", format!("tanh({0:f}) = {1:f}", c, tanh(c)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:73:51
|
73 | println!("{}", format!("tanh({0:f}) = {1:f}", d, tanh(d)));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:74:49
|
74 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:74:64
|
74 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `asinh` in this scope
--> Math1.rs:74:58
|
74 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(a), asinh(sinh(a))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:75:49
|
75 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:75:64
|
75 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `asinh` in this scope
--> Math1.rs:75:58
|
75 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(b), asinh(sinh(b))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:76:49
|
76 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:76:64
|
76 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `asinh` in this scope
--> Math1.rs:76:58
|
76 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(c), asinh(sinh(c))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:77:49
|
77 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `sinh` in this scope
--> Math1.rs:77:64
|
77 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `asinh` in this scope
--> Math1.rs:77:58
|
77 | println!("{}", format!("asinh({0:f}) = {1:f}", sinh(d), asinh(sinh(d))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:78:49
|
78 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:78:64
|
78 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `acosh` in this scope
--> Math1.rs:78:58
|
78 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(a), acosh(cosh(a))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:79:49
|
79 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:79:64
|
79 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `acosh` in this scope
--> Math1.rs:79:58
|
79 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(b), acosh(cosh(b))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:80:49
|
80 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:80:64
|
80 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `acosh` in this scope
--> Math1.rs:80:58
|
80 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(c), acosh(cosh(c))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:81:49
|
81 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `cosh` in this scope
--> Math1.rs:81:64
|
81 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `acosh` in this scope
--> Math1.rs:81:58
|
81 | println!("{}", format!("acosh({0:f}) = {1:f}", cosh(d), acosh(cosh(d))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:82:49
|
82 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:82:64
|
82 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `atanh` in this scope
--> Math1.rs:82:58
|
82 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(a), atanh(tanh(a))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:83:49
|
83 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:83:64
|
83 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `atanh` in this scope
--> Math1.rs:83:58
|
83 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(b), atanh(tanh(b))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:84:49
|
84 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:84:64
|
84 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `atanh` in this scope
--> Math1.rs:84:58
|
84 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(c), atanh(tanh(c))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:85:49
|
85 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `tanh` in this scope
--> Math1.rs:85:64
|
85 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d))));
| ^^^^ not found in this scope
error[E0425]: cannot find function `atanh` in this scope
--> Math1.rs:85:58
|
85 | println!("{}", format!("atanh({0:f}) = {1:f}", tanh(d), atanh(tanh(d))));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `log` in this scope
--> Math1.rs:88:50
|
88 | println!("{}", format!("log({0:f}) = {1:f}", a, log(a)));
| ^^^ not found in this scope
error[E0425]: cannot find function `log` in this scope
--> Math1.rs:89:50
|
89 | println!("{}", format!("log({0:f}) = {1:f}", b, log(b)));
| ^^^ not found in this scope
error[E0425]: cannot find function `log` in this scope
--> Math1.rs:90:51
|
90 | println!("{}", format!("log({0:f}) = {1:f}", -c, log(-c)));
| ^^^ not found in this scope
error[E0425]: cannot find function `log` in this scope
--> Math1.rs:91:51
|
91 | println!("{}", format!("log({0:f}) = {1:f}", -d, log(-d)));
| ^^^ not found in this scope
error[E0425]: cannot find function `log` in this scope
--> Math1.rs:92:50
|
92 | println!("{}", format!("log({0:f}) = {1:f}", e, log(e)));
| ^^^ not found in this scope
error[E0425]: cannot find function `log10` in this scope
--> Math1.rs:93:52
|
93 | println!("{}", format!("log10({0:f}) = {1:f}", a, log10(a)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `log10` in this scope
--> Math1.rs:94:52
|
94 | println!("{}", format!("log10({0:f}) = {1:f}", b, log10(b)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `log10` in this scope
--> Math1.rs:95:53
|
95 | println!("{}", format!("log10({0:f}) = {1:f}", -c, log10(-c)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `log10` in this scope
--> Math1.rs:96:53
|
96 | println!("{}", format!("log10({0:f}) = {1:f}", -d, log10(-d)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `log10` in this scope
--> Math1.rs:97:52
|
97 | println!("{}", format!("log10({0:f}) = {1:f}", e, log10(e)));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `exp` in this scope
--> Math1.rs:98:55
|
98 | println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, exp(0.5f64)));
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `exp` on `f64`
|
98 - println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, exp(0.5f64)));
98 + println!("{}", format!("exp({0:f}) = {1:f}", 0.5f64, 0.5f64.exp()));
|
error[E0425]: cannot find function `exp` in this scope
--> Math1.rs:99:55
|
99 | println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, exp(1.0f64)));
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `exp` on `f64`
|
99 - println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, exp(1.0f64)));
99 + println!("{}", format!("exp({0:f}) = {1:f}", 1.0f64, 1.0f64.exp()));
|
error[E0425]: cannot find function `exp` in this scope
--> Math1.rs:100:55
|
100 | println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, exp(2.0f64)));
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `exp` on `f64`
|
100 - println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, exp(2.0f64)));
100 + println!("{}", format!("exp({0:f}) = {1:f}", 2.0f64, 2.0f64.exp()));
|
error[E0425]: cannot find function `pow` in this scope
--> Math1.rs:101:71
|
101 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 0.5f64, pow(10.0f64,0.5f64)));
| ^^^ not found in this scope
error[E0425]: cannot find function `pow` in this scope
--> Math1.rs:102:71
|
102 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 1.0f64, pow(10.0f64,1.0f64)));
| ^^^ not found in this scope
error[E0425]: cannot find function `pow` in this scope
--> Math1.rs:103:71
|
103 | println!("{}", format!("pow({0:f}, {1:f}) = {2:f}", 10.0f64, 2.0f64, pow(10.0f64,2.0f64)));
| ^^^ not found in this scope
error[E0425]: cannot find function `sqrt` in this scope
--> Math1.rs:104:56
|
104 | println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, sqrt(0.5f64)));
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `sqrt` on `f64`
|
104 - println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, sqrt(0.5f64)));
104 + println!("{}", format!("sqrt({0:f}) = {1:f}", 0.5f64, 0.5f64.sqrt()));
|
error[E0425]: cannot find function `sqrt` in this scope
--> Math1.rs:105:56
|
105 | println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, sqrt(2.0f64)));
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `sqrt` on `f64`
|
105 - println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, sqrt(2.0f64)));
105 + println!("{}", format!("sqrt({0:f}) = {1:f}", 2.0f64, 2.0f64.sqrt()));
|
error[E0425]: cannot find function `sqrt` in this scope
--> Math1.rs:106:57
|
106 | println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, sqrt(10.0f64)));
| ^^^^ not found in this scope
|
help: use the `.` operator to call the method `sqrt` on `f64`
|
106 - println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, sqrt(10.0f64)));
106 + println!("{}", format!("sqrt({0:f}) = {1:f}", 10.0f64, 10.0f64.sqrt()));
|
error[E0425]: cannot find function `random` in this scope
--> Math1.rs:109:45
|
109 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math1.rs:110:45
|
110 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math1.rs:111:45
|
111 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error: aborting due to 305 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0425`.
/****************************************************************************** * This program demonstrates the math integer functions. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ fn main() { let a:isize = 5; let b:isize = 10; let c:isize = -2; // abs, floor, ceil, round, trunc, min, max println!("{}", format!("abs({0:d}) = {1:d}", a, abs(a))); println!("{}", format!("abs({0:d}) = {1:d}", c, abs(c))); println!("{}", format!("min({0:d}, {1:d}) = {2:d}", a, b, min(a,b))); println!("{}", format!("max({0:d}, {1:d}) = {2:d}", a, b, max(a,b))); println!("{}", format!("min({0:d}, {1:d}) = {2:d}", b, c, min(b,c))); println!("{}", format!("max({0:d}, {1:d}) = {2:d}", b, c, max(b,c))); // random numbers println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a))); println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a))); println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a))); println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a))); println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a))); println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b))); println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b))); println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b))); println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b))); println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b))); println!("{}", format!("random(2) = {0:d}", irandom(2))); println!("{}", format!("random(2) = {0:d}", irandom(2))); println!("{}", format!("random(2) = {0:d}", irandom(2))); println!("{}", format!("random(2) = {0:d}", irandom(2))); println!("{}", format!("random(2) = {0:d}", irandom(2))); println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); println!("{}", format!("random() = {0:f}", random())); }
Output
$ rustc Math2.rs
error: unknown format trait `d`
--> Math2.rs:13:33
|
13 | println!("{}", format!("abs({0:d}) = {1:d}", a, abs(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:13:42
|
13 | println!("{}", format!("abs({0:d}) = {1:d}", a, abs(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:14:33
|
14 | println!("{}", format!("abs({0:d}) = {1:d}", c, abs(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:14:42
|
14 | println!("{}", format!("abs({0:d}) = {1:d}", c, abs(c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:15:33
|
15 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", a, b, min(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:15:40
|
15 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", a, b, min(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:15:49
|
15 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", a, b, min(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:16:33
|
16 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", a, b, max(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:16:40
|
16 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", a, b, max(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:16:49
|
16 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", a, b, max(a,b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:17:33
|
17 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", b, c, min(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:17:40
|
17 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", b, c, min(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:17:49
|
17 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", b, c, min(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:18:33
|
18 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", b, c, max(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:18:40
|
18 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", b, c, max(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:18:49
|
18 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", b, c, max(b,c)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:21:36
|
21 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:21:45
|
21 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:22:36
|
22 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:22:45
|
22 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:23:36
|
23 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:23:45
|
23 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:24:36
|
24 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:24:45
|
24 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:25:36
|
25 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:25:45
|
25 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:26:36
|
26 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:26:45
|
26 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:27:36
|
27 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:27:45
|
27 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:28:36
|
28 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:28:45
|
28 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:29:36
|
29 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:29:45
|
29 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:30:36
|
30 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:30:45
|
30 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:31:41
|
31 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:32:41
|
32 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:33:41
|
33 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:34:41
|
34 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `d`
--> Math2.rs:35:41
|
35 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math2.rs:36:40
|
36 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math2.rs:37:40
|
37 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math2.rs:38:40
|
38 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math2.rs:39:40
|
39 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> Math2.rs:40:40
|
40 | println!("{}", format!("random() = {0:f}", random()));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find function `min` in this scope
--> Math2.rs:15:60
|
15 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", a, b, min(a,b)));
| ^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::cmp::min;
|
error[E0425]: cannot find function `max` in this scope
--> Math2.rs:16:60
|
16 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", a, b, max(a,b)));
| ^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::cmp::max;
|
error[E0425]: cannot find function `min` in this scope
--> Math2.rs:17:60
|
17 | println!("{}", format!("min({0:d}, {1:d}) = {2:d}", b, c, min(b,c)));
| ^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::cmp::min;
|
error[E0425]: cannot find function `max` in this scope
--> Math2.rs:18:60
|
18 | println!("{}", format!("max({0:d}, {1:d}) = {2:d}", b, c, max(b,c)));
| ^^^ not found in this scope
|
help: consider importing this function
|
7 + use std::cmp::max;
|
error[E0425]: cannot find function `abs` in this scope
--> Math2.rs:13:50
|
13 | println!("{}", format!("abs({0:d}) = {1:d}", a, abs(a)));
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `abs` on `isize`
|
13 - println!("{}", format!("abs({0:d}) = {1:d}", a, abs(a)));
13 + println!("{}", format!("abs({0:d}) = {1:d}", a, a.abs()));
|
error[E0425]: cannot find function `abs` in this scope
--> Math2.rs:14:50
|
14 | println!("{}", format!("abs({0:d}) = {1:d}", c, abs(c)));
| ^^^ not found in this scope
|
help: use the `.` operator to call the method `abs` on `isize`
|
14 - println!("{}", format!("abs({0:d}) = {1:d}", c, abs(c)));
14 + println!("{}", format!("abs({0:d}) = {1:d}", c, c.abs()));
|
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:21:53
|
21 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:22:53
|
22 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:23:53
|
23 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:24:53
|
24 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:25:53
|
25 | println!("{}", format!("random({0:d}) = {1:d}", a, irandom(a)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:26:53
|
26 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:27:53
|
27 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:28:53
|
28 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:29:53
|
29 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:30:53
|
30 | println!("{}", format!("random({0:d}) = {1:d}", b, irandom(b)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:31:46
|
31 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:32:46
|
32 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:33:46
|
33 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:34:46
|
34 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `irandom` in this scope
--> Math2.rs:35:46
|
35 | println!("{}", format!("random(2) = {0:d}", irandom(2)));
| ^^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math2.rs:36:45
|
36 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math2.rs:37:45
|
37 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math2.rs:38:45
|
38 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math2.rs:39:45
|
39 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error[E0425]: cannot find function `random` in this scope
--> Math2.rs:40:45
|
40 | println!("{}", format!("random() = {0:f}", random()));
| ^^^^^^ not found in this scope
error: aborting due to 72 previous errors
For more information about this error, try `rustc --explain E0425`.
Random Numbers
Explain how to generate uniform random numbers, int and fp.
Questions
- {{Write an expression that yields √5.}}
- {{Write an expression that yields 3√5.}}
- {{Write an expression that yields the secant of π/4.}}
- {{Write an expression that yields log16 100.}}
Projects
More ★'s indicate higher difficulty level.
References
- [[Rust Language Reference]]
- [[Rust Compiler]]