Average Error: 10.6 → 10.6
Time: 21.0s
Precision: binary64
\[\left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N\]
\[\left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N\]
\left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N
\left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N
double code(double r, double cosP, double T, double sinP, double B, double sinT, double maxRadius, double N) {
	return ((double) (((double) (((double) M_PI) + ((double) (r * ((double) (((double) (cosP * T)) + ((double) (sinP * B)))))))) + ((double) (((double) (sinT * maxRadius)) * N))));
}
double code(double r, double cosP, double T, double sinP, double B, double sinT, double maxRadius, double N) {
	return ((double) (((double) (((double) M_PI) + ((double) (r * ((double) (((double) (cosP * T)) + ((double) (sinP * B)))))))) + ((double) (((double) (sinT * maxRadius)) * N))));
}

Error

Bits error versus r

Bits error versus cosP

Bits error versus T

Bits error versus sinP

Bits error versus B

Bits error versus sinT

Bits error versus maxRadius

Bits error versus N

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 10.6

    \[\left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N\]
  2. Final simplification10.6

    \[\leadsto \left(\pi + r \cdot \left(cosP \cdot T + sinP \cdot B\right)\right) + \left(sinT \cdot maxRadius\right) \cdot N\]

Reproduce

herbie shell --seed 2020153 
(FPCore (r cosP T sinP B sinT maxRadius N)
  :name "(+ (+ PI (* r (+ (* cosP T) (* sinP B)))) (* (* sinT maxRadius) N))"
  :precision binary64
  (+ (+ PI (* r (+ (* cosP T) (* sinP B)))) (* (* sinT maxRadius) N)))