
(FPCore (v w r) :precision binary64 (- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))
double code(double v, double w, double r) {
return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = ((3.0d0 + (2.0d0 / (r * r))) - (((0.125d0 * (3.0d0 - (2.0d0 * v))) * (((w * w) * r) * r)) / (1.0d0 - v))) - 4.5d0
end function
public static double code(double v, double w, double r) {
return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
def code(v, w, r): return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5
function code(v, w, r) return Float64(Float64(Float64(3.0 + Float64(2.0 / Float64(r * r))) - Float64(Float64(Float64(0.125 * Float64(3.0 - Float64(2.0 * v))) * Float64(Float64(Float64(w * w) * r) * r)) / Float64(1.0 - v))) - 4.5) end
function tmp = code(v, w, r) tmp = ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5; end
code[v_, w_, r_] := N[(N[(N[(3.0 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.125 * N[(3.0 - N[(2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(w * w), $MachinePrecision] * r), $MachinePrecision] * r), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (v w r) :precision binary64 (- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))
double code(double v, double w, double r) {
return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = ((3.0d0 + (2.0d0 / (r * r))) - (((0.125d0 * (3.0d0 - (2.0d0 * v))) * (((w * w) * r) * r)) / (1.0d0 - v))) - 4.5d0
end function
public static double code(double v, double w, double r) {
return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5;
}
def code(v, w, r): return ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5
function code(v, w, r) return Float64(Float64(Float64(3.0 + Float64(2.0 / Float64(r * r))) - Float64(Float64(Float64(0.125 * Float64(3.0 - Float64(2.0 * v))) * Float64(Float64(Float64(w * w) * r) * r)) / Float64(1.0 - v))) - 4.5) end
function tmp = code(v, w, r) tmp = ((3.0 + (2.0 / (r * r))) - (((0.125 * (3.0 - (2.0 * v))) * (((w * w) * r) * r)) / (1.0 - v))) - 4.5; end
code[v_, w_, r_] := N[(N[(N[(3.0 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(0.125 * N[(3.0 - N[(2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(w * w), $MachinePrecision] * r), $MachinePrecision] * r), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 4.5), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{\left(0.125 \cdot \left(3 - 2 \cdot v\right)\right) \cdot \left(\left(\left(w \cdot w\right) \cdot r\right) \cdot r\right)}{1 - v}\right) - 4.5
\end{array}
(FPCore (v w r) :precision binary64 (+ (- (+ 3.0 (* 2.0 (pow r -2.0))) (* (fma -2.0 v 3.0) (/ 0.125 (/ (- 1.0 v) (pow (* r w) 2.0))))) -4.5))
double code(double v, double w, double r) {
return ((3.0 + (2.0 * pow(r, -2.0))) - (fma(-2.0, v, 3.0) * (0.125 / ((1.0 - v) / pow((r * w), 2.0))))) + -4.5;
}
function code(v, w, r) return Float64(Float64(Float64(3.0 + Float64(2.0 * (r ^ -2.0))) - Float64(fma(-2.0, v, 3.0) * Float64(0.125 / Float64(Float64(1.0 - v) / (Float64(r * w) ^ 2.0))))) + -4.5) end
code[v_, w_, r_] := N[(N[(N[(3.0 + N[(2.0 * N[Power[r, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(-2.0 * v + 3.0), $MachinePrecision] * N[(0.125 / N[(N[(1.0 - v), $MachinePrecision] / N[Power[N[(r * w), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -4.5), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(3 + 2 \cdot {r}^{-2}\right) - \mathsf{fma}\left(-2, v, 3\right) \cdot \frac{0.125}{\frac{1 - v}{{\left(r \cdot w\right)}^{2}}}\right) + -4.5
\end{array}
Initial program 81.2%
Simplified78.0%
*-commutative78.0%
*-un-lft-identity78.0%
times-frac78.0%
+-commutative78.0%
fma-def78.0%
unswap-sqr99.7%
pow299.7%
Applied egg-rr99.7%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (v w r)
:precision binary64
(+
-4.5
(-
(+ 3.0 (* 2.0 (pow r -2.0)))
(/
(* 0.125 (+ 3.0 (* -2.0 v)))
(* (/ 1.0 (* r w)) (/ (- 1.0 v) (* r w)))))))
double code(double v, double w, double r) {
return -4.5 + ((3.0 + (2.0 * pow(r, -2.0))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = (-4.5d0) + ((3.0d0 + (2.0d0 * (r ** (-2.0d0)))) - ((0.125d0 * (3.0d0 + ((-2.0d0) * v))) / ((1.0d0 / (r * w)) * ((1.0d0 - v) / (r * w)))))
end function
public static double code(double v, double w, double r) {
return -4.5 + ((3.0 + (2.0 * Math.pow(r, -2.0))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
def code(v, w, r): return -4.5 + ((3.0 + (2.0 * math.pow(r, -2.0))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))))
function code(v, w, r) return Float64(-4.5 + Float64(Float64(3.0 + Float64(2.0 * (r ^ -2.0))) - Float64(Float64(0.125 * Float64(3.0 + Float64(-2.0 * v))) / Float64(Float64(1.0 / Float64(r * w)) * Float64(Float64(1.0 - v) / Float64(r * w)))))) end
function tmp = code(v, w, r) tmp = -4.5 + ((3.0 + (2.0 * (r ^ -2.0))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w))))); end
code[v_, w_, r_] := N[(-4.5 + N[(N[(3.0 + N[(2.0 * N[Power[r, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(0.125 * N[(3.0 + N[(-2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 / N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 - v), $MachinePrecision] / N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 + \left(\left(3 + 2 \cdot {r}^{-2}\right) - \frac{0.125 \cdot \left(3 + -2 \cdot v\right)}{\frac{1}{r \cdot w} \cdot \frac{1 - v}{r \cdot w}}\right)
\end{array}
Initial program 81.2%
Simplified78.0%
*-un-lft-identity78.0%
add-sqr-sqrt78.0%
times-frac78.0%
unswap-sqr78.0%
sqrt-prod45.9%
add-sqr-sqrt62.0%
unswap-sqr80.7%
sqrt-prod58.4%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (v w r)
:precision binary64
(+
-4.5
(-
(+ 3.0 (/ 2.0 (* r r)))
(/
(* 0.125 (+ 3.0 (* -2.0 v)))
(* (/ 1.0 (* r w)) (/ (- 1.0 v) (* r w)))))))
double code(double v, double w, double r) {
return -4.5 + ((3.0 + (2.0 / (r * r))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = (-4.5d0) + ((3.0d0 + (2.0d0 / (r * r))) - ((0.125d0 * (3.0d0 + ((-2.0d0) * v))) / ((1.0d0 / (r * w)) * ((1.0d0 - v) / (r * w)))))
end function
public static double code(double v, double w, double r) {
return -4.5 + ((3.0 + (2.0 / (r * r))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
def code(v, w, r): return -4.5 + ((3.0 + (2.0 / (r * r))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))))
function code(v, w, r) return Float64(-4.5 + Float64(Float64(3.0 + Float64(2.0 / Float64(r * r))) - Float64(Float64(0.125 * Float64(3.0 + Float64(-2.0 * v))) / Float64(Float64(1.0 / Float64(r * w)) * Float64(Float64(1.0 - v) / Float64(r * w)))))) end
function tmp = code(v, w, r) tmp = -4.5 + ((3.0 + (2.0 / (r * r))) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w))))); end
code[v_, w_, r_] := N[(-4.5 + N[(N[(3.0 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(0.125 * N[(3.0 + N[(-2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 / N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 - v), $MachinePrecision] / N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 + \left(\left(3 + \frac{2}{r \cdot r}\right) - \frac{0.125 \cdot \left(3 + -2 \cdot v\right)}{\frac{1}{r \cdot w} \cdot \frac{1 - v}{r \cdot w}}\right)
\end{array}
Initial program 81.2%
Simplified78.0%
*-un-lft-identity78.0%
add-sqr-sqrt78.0%
times-frac78.0%
unswap-sqr78.0%
sqrt-prod45.9%
add-sqr-sqrt62.0%
unswap-sqr80.7%
sqrt-prod58.4%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (v w r)
:precision binary64
(+
-4.5
(-
(+ 3.0 (/ (/ 2.0 r) r))
(/
(* 0.125 (+ 3.0 (* -2.0 v)))
(* (/ 1.0 (* r w)) (/ (- 1.0 v) (* r w)))))))
double code(double v, double w, double r) {
return -4.5 + ((3.0 + ((2.0 / r) / r)) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = (-4.5d0) + ((3.0d0 + ((2.0d0 / r) / r)) - ((0.125d0 * (3.0d0 + ((-2.0d0) * v))) / ((1.0d0 / (r * w)) * ((1.0d0 - v) / (r * w)))))
end function
public static double code(double v, double w, double r) {
return -4.5 + ((3.0 + ((2.0 / r) / r)) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))));
}
def code(v, w, r): return -4.5 + ((3.0 + ((2.0 / r) / r)) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w)))))
function code(v, w, r) return Float64(-4.5 + Float64(Float64(3.0 + Float64(Float64(2.0 / r) / r)) - Float64(Float64(0.125 * Float64(3.0 + Float64(-2.0 * v))) / Float64(Float64(1.0 / Float64(r * w)) * Float64(Float64(1.0 - v) / Float64(r * w)))))) end
function tmp = code(v, w, r) tmp = -4.5 + ((3.0 + ((2.0 / r) / r)) - ((0.125 * (3.0 + (-2.0 * v))) / ((1.0 / (r * w)) * ((1.0 - v) / (r * w))))); end
code[v_, w_, r_] := N[(-4.5 + N[(N[(3.0 + N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision]), $MachinePrecision] - N[(N[(0.125 * N[(3.0 + N[(-2.0 * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 / N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 - v), $MachinePrecision] / N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 + \left(\left(3 + \frac{\frac{2}{r}}{r}\right) - \frac{0.125 \cdot \left(3 + -2 \cdot v\right)}{\frac{1}{r \cdot w} \cdot \frac{1 - v}{r \cdot w}}\right)
\end{array}
Initial program 81.2%
Simplified78.0%
*-un-lft-identity78.0%
add-sqr-sqrt78.0%
times-frac78.0%
unswap-sqr78.0%
sqrt-prod45.9%
add-sqr-sqrt62.0%
unswap-sqr80.7%
sqrt-prod58.4%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr99.8%
metadata-eval42.6%
pow-flip42.5%
pow242.5%
div-inv42.5%
associate-/r*42.5%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (v w r)
:precision binary64
(let* ((t_0 (/ 2.0 (* r r))))
(if (<= (* w w) 2e+220)
(+
t_0
(- -1.5 (* (/ (+ 0.375 (* v -0.25)) (- 1.0 v)) (* r (* r (* w w))))))
(+ -4.5 (- (+ 3.0 t_0) (* 0.375 (* w (* w (* r r)))))))))
double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - (((0.375 + (v * -0.25)) / (1.0 - v)) * (r * (r * (w * w)))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 / (r * r)
if ((w * w) <= 2d+220) then
tmp = t_0 + ((-1.5d0) - (((0.375d0 + (v * (-0.25d0))) / (1.0d0 - v)) * (r * (r * (w * w)))))
else
tmp = (-4.5d0) + ((3.0d0 + t_0) - (0.375d0 * (w * (w * (r * r)))))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - (((0.375 + (v * -0.25)) / (1.0 - v)) * (r * (r * (w * w)))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
def code(v, w, r): t_0 = 2.0 / (r * r) tmp = 0 if (w * w) <= 2e+220: tmp = t_0 + (-1.5 - (((0.375 + (v * -0.25)) / (1.0 - v)) * (r * (r * (w * w))))) else: tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))) return tmp
function code(v, w, r) t_0 = Float64(2.0 / Float64(r * r)) tmp = 0.0 if (Float64(w * w) <= 2e+220) tmp = Float64(t_0 + Float64(-1.5 - Float64(Float64(Float64(0.375 + Float64(v * -0.25)) / Float64(1.0 - v)) * Float64(r * Float64(r * Float64(w * w)))))); else tmp = Float64(-4.5 + Float64(Float64(3.0 + t_0) - Float64(0.375 * Float64(w * Float64(w * Float64(r * r)))))); end return tmp end
function tmp_2 = code(v, w, r) t_0 = 2.0 / (r * r); tmp = 0.0; if ((w * w) <= 2e+220) tmp = t_0 + (-1.5 - (((0.375 + (v * -0.25)) / (1.0 - v)) * (r * (r * (w * w))))); else tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))); end tmp_2 = tmp; end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w * w), $MachinePrecision], 2e+220], N[(t$95$0 + N[(-1.5 - N[(N[(N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision] * N[(r * N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 + N[(N[(3.0 + t$95$0), $MachinePrecision] - N[(0.375 * N[(w * N[(w * N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;w \cdot w \leq 2 \cdot 10^{+220}:\\
\;\;\;\;t_0 + \left(-1.5 - \frac{0.375 + v \cdot -0.25}{1 - v} \cdot \left(r \cdot \left(r \cdot \left(w \cdot w\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 + \left(\left(3 + t_0\right) - 0.375 \cdot \left(w \cdot \left(w \cdot \left(r \cdot r\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 w w) < 2e220Initial program 88.8%
associate--l-88.8%
+-commutative88.8%
associate--l+88.8%
+-commutative88.8%
associate--r+88.8%
metadata-eval88.8%
associate-*l/96.8%
*-commutative96.8%
*-commutative96.8%
*-commutative96.8%
Simplified96.8%
if 2e220 < (*.f64 w w) Initial program 67.6%
Simplified67.6%
Taylor expanded in v around 0 67.6%
*-commutative67.6%
unpow267.6%
unpow267.6%
*-commutative67.6%
swap-sqr98.5%
unpow298.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
unpow298.5%
unswap-sqr67.6%
associate-*l*98.5%
Applied egg-rr98.5%
Final simplification97.4%
(FPCore (v w r)
:precision binary64
(let* ((t_0 (/ 2.0 (* r r))))
(if (<= (* w w) 2e+220)
(+
t_0
(- -1.5 (* (* r (* w (* r w))) (/ (+ 0.375 (* v -0.25)) (- 1.0 v)))))
(+ -4.5 (- (+ 3.0 t_0) (* 0.375 (* w (* w (* r r)))))))))
double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - ((r * (w * (r * w))) * ((0.375 + (v * -0.25)) / (1.0 - v))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 / (r * r)
if ((w * w) <= 2d+220) then
tmp = t_0 + ((-1.5d0) - ((r * (w * (r * w))) * ((0.375d0 + (v * (-0.25d0))) / (1.0d0 - v))))
else
tmp = (-4.5d0) + ((3.0d0 + t_0) - (0.375d0 * (w * (w * (r * r)))))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - ((r * (w * (r * w))) * ((0.375 + (v * -0.25)) / (1.0 - v))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
def code(v, w, r): t_0 = 2.0 / (r * r) tmp = 0 if (w * w) <= 2e+220: tmp = t_0 + (-1.5 - ((r * (w * (r * w))) * ((0.375 + (v * -0.25)) / (1.0 - v)))) else: tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))) return tmp
function code(v, w, r) t_0 = Float64(2.0 / Float64(r * r)) tmp = 0.0 if (Float64(w * w) <= 2e+220) tmp = Float64(t_0 + Float64(-1.5 - Float64(Float64(r * Float64(w * Float64(r * w))) * Float64(Float64(0.375 + Float64(v * -0.25)) / Float64(1.0 - v))))); else tmp = Float64(-4.5 + Float64(Float64(3.0 + t_0) - Float64(0.375 * Float64(w * Float64(w * Float64(r * r)))))); end return tmp end
function tmp_2 = code(v, w, r) t_0 = 2.0 / (r * r); tmp = 0.0; if ((w * w) <= 2e+220) tmp = t_0 + (-1.5 - ((r * (w * (r * w))) * ((0.375 + (v * -0.25)) / (1.0 - v)))); else tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))); end tmp_2 = tmp; end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w * w), $MachinePrecision], 2e+220], N[(t$95$0 + N[(-1.5 - N[(N[(r * N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.375 + N[(v * -0.25), $MachinePrecision]), $MachinePrecision] / N[(1.0 - v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 + N[(N[(3.0 + t$95$0), $MachinePrecision] - N[(0.375 * N[(w * N[(w * N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;w \cdot w \leq 2 \cdot 10^{+220}:\\
\;\;\;\;t_0 + \left(-1.5 - \left(r \cdot \left(w \cdot \left(r \cdot w\right)\right)\right) \cdot \frac{0.375 + v \cdot -0.25}{1 - v}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 + \left(\left(3 + t_0\right) - 0.375 \cdot \left(w \cdot \left(w \cdot \left(r \cdot r\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 w w) < 2e220Initial program 88.8%
associate--l-88.8%
+-commutative88.8%
associate--l+88.8%
+-commutative88.8%
associate--r+88.8%
metadata-eval88.8%
associate-*l/96.8%
*-commutative96.8%
*-commutative96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in r around 0 96.8%
unpow296.8%
*-commutative96.8%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if 2e220 < (*.f64 w w) Initial program 67.6%
Simplified67.6%
Taylor expanded in v around 0 67.6%
*-commutative67.6%
unpow267.6%
unpow267.6%
*-commutative67.6%
swap-sqr98.5%
unpow298.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
unpow298.5%
unswap-sqr67.6%
associate-*l*98.5%
Applied egg-rr98.5%
Final simplification99.3%
(FPCore (v w r)
:precision binary64
(let* ((t_0 (* w (* r w))) (t_1 (/ 2.0 (* r r))))
(if (<= v -2.45e+42)
(+ t_1 (- -1.5 (/ r (/ 4.0 t_0))))
(if (<= v 0.13)
(+ -4.5 (- (+ 3.0 t_1) (* 0.375 (* (* r w) (* r w)))))
(+ t_1 (- -1.5 (* (/ r 4.0) t_0)))))))
double code(double v, double w, double r) {
double t_0 = w * (r * w);
double t_1 = 2.0 / (r * r);
double tmp;
if (v <= -2.45e+42) {
tmp = t_1 + (-1.5 - (r / (4.0 / t_0)));
} else if (v <= 0.13) {
tmp = -4.5 + ((3.0 + t_1) - (0.375 * ((r * w) * (r * w))));
} else {
tmp = t_1 + (-1.5 - ((r / 4.0) * t_0));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = w * (r * w)
t_1 = 2.0d0 / (r * r)
if (v <= (-2.45d+42)) then
tmp = t_1 + ((-1.5d0) - (r / (4.0d0 / t_0)))
else if (v <= 0.13d0) then
tmp = (-4.5d0) + ((3.0d0 + t_1) - (0.375d0 * ((r * w) * (r * w))))
else
tmp = t_1 + ((-1.5d0) - ((r / 4.0d0) * t_0))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double t_0 = w * (r * w);
double t_1 = 2.0 / (r * r);
double tmp;
if (v <= -2.45e+42) {
tmp = t_1 + (-1.5 - (r / (4.0 / t_0)));
} else if (v <= 0.13) {
tmp = -4.5 + ((3.0 + t_1) - (0.375 * ((r * w) * (r * w))));
} else {
tmp = t_1 + (-1.5 - ((r / 4.0) * t_0));
}
return tmp;
}
def code(v, w, r): t_0 = w * (r * w) t_1 = 2.0 / (r * r) tmp = 0 if v <= -2.45e+42: tmp = t_1 + (-1.5 - (r / (4.0 / t_0))) elif v <= 0.13: tmp = -4.5 + ((3.0 + t_1) - (0.375 * ((r * w) * (r * w)))) else: tmp = t_1 + (-1.5 - ((r / 4.0) * t_0)) return tmp
function code(v, w, r) t_0 = Float64(w * Float64(r * w)) t_1 = Float64(2.0 / Float64(r * r)) tmp = 0.0 if (v <= -2.45e+42) tmp = Float64(t_1 + Float64(-1.5 - Float64(r / Float64(4.0 / t_0)))); elseif (v <= 0.13) tmp = Float64(-4.5 + Float64(Float64(3.0 + t_1) - Float64(0.375 * Float64(Float64(r * w) * Float64(r * w))))); else tmp = Float64(t_1 + Float64(-1.5 - Float64(Float64(r / 4.0) * t_0))); end return tmp end
function tmp_2 = code(v, w, r) t_0 = w * (r * w); t_1 = 2.0 / (r * r); tmp = 0.0; if (v <= -2.45e+42) tmp = t_1 + (-1.5 - (r / (4.0 / t_0))); elseif (v <= 0.13) tmp = -4.5 + ((3.0 + t_1) - (0.375 * ((r * w) * (r * w)))); else tmp = t_1 + (-1.5 - ((r / 4.0) * t_0)); end tmp_2 = tmp; end
code[v_, w_, r_] := Block[{t$95$0 = N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[v, -2.45e+42], N[(t$95$1 + N[(-1.5 - N[(r / N[(4.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[v, 0.13], N[(-4.5 + N[(N[(3.0 + t$95$1), $MachinePrecision] - N[(0.375 * N[(N[(r * w), $MachinePrecision] * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(-1.5 - N[(N[(r / 4.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := w \cdot \left(r \cdot w\right)\\
t_1 := \frac{2}{r \cdot r}\\
\mathbf{if}\;v \leq -2.45 \cdot 10^{+42}:\\
\;\;\;\;t_1 + \left(-1.5 - \frac{r}{\frac{4}{t_0}}\right)\\
\mathbf{elif}\;v \leq 0.13:\\
\;\;\;\;-4.5 + \left(\left(3 + t_1\right) - 0.375 \cdot \left(\left(r \cdot w\right) \cdot \left(r \cdot w\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(-1.5 - \frac{r}{4} \cdot t_0\right)\\
\end{array}
\end{array}
if v < -2.4500000000000001e42Initial program 80.5%
associate--l-80.5%
+-commutative80.5%
associate--l+80.5%
+-commutative80.5%
associate--r+80.5%
metadata-eval80.5%
associate-*r*80.5%
*-commutative80.5%
associate-/l*86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in v around inf 89.2%
unpow289.2%
*-commutative89.2%
associate-*l*96.9%
*-commutative96.9%
Simplified96.9%
if -2.4500000000000001e42 < v < 0.13Initial program 84.3%
Simplified80.5%
Taylor expanded in v around 0 80.5%
*-commutative80.5%
unpow280.5%
unpow280.5%
*-commutative80.5%
swap-sqr99.0%
unpow299.0%
*-commutative99.0%
Simplified99.0%
*-commutative99.0%
unpow299.0%
Applied egg-rr99.0%
if 0.13 < v Initial program 75.6%
associate--l-75.6%
+-commutative75.6%
associate--l+75.6%
+-commutative75.6%
associate--r+75.6%
metadata-eval75.6%
associate-*r*74.1%
*-commutative74.1%
associate-/l*82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in v around inf 86.3%
unpow286.3%
*-commutative86.3%
associate-*l*93.9%
*-commutative93.9%
Simplified93.9%
associate-/r/94.0%
*-commutative94.0%
Applied egg-rr94.0%
Final simplification97.2%
(FPCore (v w r)
:precision binary64
(let* ((t_0 (/ 2.0 (* r r))))
(if (<= (* w w) 2e+220)
(+ t_0 (- -1.5 (/ r (/ 4.0 (* w (* r w))))))
(+ -4.5 (- (+ 3.0 t_0) (* 0.375 (* w (* w (* r r)))))))))
double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - (r / (4.0 / (w * (r * w)))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 / (r * r)
if ((w * w) <= 2d+220) then
tmp = t_0 + ((-1.5d0) - (r / (4.0d0 / (w * (r * w)))))
else
tmp = (-4.5d0) + ((3.0d0 + t_0) - (0.375d0 * (w * (w * (r * r)))))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double t_0 = 2.0 / (r * r);
double tmp;
if ((w * w) <= 2e+220) {
tmp = t_0 + (-1.5 - (r / (4.0 / (w * (r * w)))));
} else {
tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r)))));
}
return tmp;
}
def code(v, w, r): t_0 = 2.0 / (r * r) tmp = 0 if (w * w) <= 2e+220: tmp = t_0 + (-1.5 - (r / (4.0 / (w * (r * w))))) else: tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))) return tmp
function code(v, w, r) t_0 = Float64(2.0 / Float64(r * r)) tmp = 0.0 if (Float64(w * w) <= 2e+220) tmp = Float64(t_0 + Float64(-1.5 - Float64(r / Float64(4.0 / Float64(w * Float64(r * w)))))); else tmp = Float64(-4.5 + Float64(Float64(3.0 + t_0) - Float64(0.375 * Float64(w * Float64(w * Float64(r * r)))))); end return tmp end
function tmp_2 = code(v, w, r) t_0 = 2.0 / (r * r); tmp = 0.0; if ((w * w) <= 2e+220) tmp = t_0 + (-1.5 - (r / (4.0 / (w * (r * w))))); else tmp = -4.5 + ((3.0 + t_0) - (0.375 * (w * (w * (r * r))))); end tmp_2 = tmp; end
code[v_, w_, r_] := Block[{t$95$0 = N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(w * w), $MachinePrecision], 2e+220], N[(t$95$0 + N[(-1.5 - N[(r / N[(4.0 / N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 + N[(N[(3.0 + t$95$0), $MachinePrecision] - N[(0.375 * N[(w * N[(w * N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{2}{r \cdot r}\\
\mathbf{if}\;w \cdot w \leq 2 \cdot 10^{+220}:\\
\;\;\;\;t_0 + \left(-1.5 - \frac{r}{\frac{4}{w \cdot \left(r \cdot w\right)}}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 + \left(\left(3 + t_0\right) - 0.375 \cdot \left(w \cdot \left(w \cdot \left(r \cdot r\right)\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 w w) < 2e220Initial program 88.8%
associate--l-88.8%
+-commutative88.8%
associate--l+88.8%
+-commutative88.8%
associate--r+88.8%
metadata-eval88.8%
associate-*r*88.8%
*-commutative88.8%
associate-/l*94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in v around inf 92.4%
unpow292.4%
*-commutative92.4%
associate-*l*93.7%
*-commutative93.7%
Simplified93.7%
if 2e220 < (*.f64 w w) Initial program 67.6%
Simplified67.6%
Taylor expanded in v around 0 67.6%
*-commutative67.6%
unpow267.6%
unpow267.6%
*-commutative67.6%
swap-sqr98.5%
unpow298.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
unpow298.5%
unswap-sqr67.6%
associate-*l*98.5%
Applied egg-rr98.5%
Final simplification95.4%
(FPCore (v w r) :precision binary64 (if (<= r 1.75e-141) (/ (/ 2.0 r) r) (+ (/ 2.0 (* r r)) (- -1.5 (* (* w (* r w)) (/ r 2.6666666666666665))))))
double code(double v, double w, double r) {
double tmp;
if (r <= 1.75e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((w * (r * w)) * (r / 2.6666666666666665)));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 1.75d-141) then
tmp = (2.0d0 / r) / r
else
tmp = (2.0d0 / (r * r)) + ((-1.5d0) - ((w * (r * w)) * (r / 2.6666666666666665d0)))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 1.75e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((w * (r * w)) * (r / 2.6666666666666665)));
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 1.75e-141: tmp = (2.0 / r) / r else: tmp = (2.0 / (r * r)) + (-1.5 - ((w * (r * w)) * (r / 2.6666666666666665))) return tmp
function code(v, w, r) tmp = 0.0 if (r <= 1.75e-141) tmp = Float64(Float64(2.0 / r) / r); else tmp = Float64(Float64(2.0 / Float64(r * r)) + Float64(-1.5 - Float64(Float64(w * Float64(r * w)) * Float64(r / 2.6666666666666665)))); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 1.75e-141) tmp = (2.0 / r) / r; else tmp = (2.0 / (r * r)) + (-1.5 - ((w * (r * w)) * (r / 2.6666666666666665))); end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 1.75e-141], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + N[(-1.5 - N[(N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision] * N[(r / 2.6666666666666665), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 1.75 \cdot 10^{-141}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 - \left(w \cdot \left(r \cdot w\right)\right) \cdot \frac{r}{2.6666666666666665}\right)\\
\end{array}
\end{array}
if r < 1.7500000000000001e-141Initial program 77.6%
Simplified75.8%
Taylor expanded in v around inf 73.5%
*-commutative73.5%
unpow273.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in r around 0 53.9%
unpow253.9%
Simplified53.9%
div-inv99.8%
pow299.8%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr54.0%
metadata-eval54.0%
pow-flip53.9%
pow253.9%
div-inv53.9%
associate-/r*53.9%
Applied egg-rr53.9%
if 1.7500000000000001e-141 < r Initial program 88.6%
associate--l-88.6%
+-commutative88.6%
associate--l+88.6%
+-commutative88.6%
associate--r+88.6%
metadata-eval88.6%
associate-*r*88.6%
*-commutative88.6%
associate-/l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in v around 0 85.4%
unpow285.4%
*-commutative85.4%
associate-*l*88.6%
*-commutative88.6%
Simplified88.6%
associate-/r/88.7%
*-commutative88.7%
Applied egg-rr88.7%
Final simplification65.3%
(FPCore (v w r) :precision binary64 (if (<= r 1e-142) (/ (/ 2.0 r) r) (+ (/ 2.0 (* r r)) (- -1.5 (* (* r (* w w)) (/ r 4.0))))))
double code(double v, double w, double r) {
double tmp;
if (r <= 1e-142) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((r * (w * w)) * (r / 4.0)));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 1d-142) then
tmp = (2.0d0 / r) / r
else
tmp = (2.0d0 / (r * r)) + ((-1.5d0) - ((r * (w * w)) * (r / 4.0d0)))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 1e-142) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((r * (w * w)) * (r / 4.0)));
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 1e-142: tmp = (2.0 / r) / r else: tmp = (2.0 / (r * r)) + (-1.5 - ((r * (w * w)) * (r / 4.0))) return tmp
function code(v, w, r) tmp = 0.0 if (r <= 1e-142) tmp = Float64(Float64(2.0 / r) / r); else tmp = Float64(Float64(2.0 / Float64(r * r)) + Float64(-1.5 - Float64(Float64(r * Float64(w * w)) * Float64(r / 4.0)))); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 1e-142) tmp = (2.0 / r) / r; else tmp = (2.0 / (r * r)) + (-1.5 - ((r * (w * w)) * (r / 4.0))); end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 1e-142], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + N[(-1.5 - N[(N[(r * N[(w * w), $MachinePrecision]), $MachinePrecision] * N[(r / 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 10^{-142}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 - \left(r \cdot \left(w \cdot w\right)\right) \cdot \frac{r}{4}\right)\\
\end{array}
\end{array}
if r < 1e-142Initial program 77.6%
Simplified75.8%
Taylor expanded in v around inf 73.5%
*-commutative73.5%
unpow273.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in r around 0 53.9%
unpow253.9%
Simplified53.9%
div-inv99.8%
pow299.8%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr54.0%
metadata-eval54.0%
pow-flip53.9%
pow253.9%
div-inv53.9%
associate-/r*53.9%
Applied egg-rr53.9%
if 1e-142 < r Initial program 88.6%
associate--l-88.6%
+-commutative88.6%
associate--l+88.6%
+-commutative88.6%
associate--r+88.6%
metadata-eval88.6%
associate-*r*88.6%
*-commutative88.6%
associate-/l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in v around inf 89.1%
unpow289.1%
*-commutative89.1%
associate-*l*91.6%
*-commutative91.6%
Simplified91.6%
associate-/r/91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in w around 0 89.1%
unpow289.1%
Simplified89.1%
Final simplification65.5%
(FPCore (v w r) :precision binary64 (if (<= r 2e-141) (/ (/ 2.0 r) r) (+ (/ 2.0 (* r r)) (- -1.5 (* (/ r 4.0) (* w (* r w)))))))
double code(double v, double w, double r) {
double tmp;
if (r <= 2e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((r / 4.0) * (w * (r * w))));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 2d-141) then
tmp = (2.0d0 / r) / r
else
tmp = (2.0d0 / (r * r)) + ((-1.5d0) - ((r / 4.0d0) * (w * (r * w))))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 2e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - ((r / 4.0) * (w * (r * w))));
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 2e-141: tmp = (2.0 / r) / r else: tmp = (2.0 / (r * r)) + (-1.5 - ((r / 4.0) * (w * (r * w)))) return tmp
function code(v, w, r) tmp = 0.0 if (r <= 2e-141) tmp = Float64(Float64(2.0 / r) / r); else tmp = Float64(Float64(2.0 / Float64(r * r)) + Float64(-1.5 - Float64(Float64(r / 4.0) * Float64(w * Float64(r * w))))); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 2e-141) tmp = (2.0 / r) / r; else tmp = (2.0 / (r * r)) + (-1.5 - ((r / 4.0) * (w * (r * w)))); end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 2e-141], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + N[(-1.5 - N[(N[(r / 4.0), $MachinePrecision] * N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 2 \cdot 10^{-141}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 - \frac{r}{4} \cdot \left(w \cdot \left(r \cdot w\right)\right)\right)\\
\end{array}
\end{array}
if r < 2.0000000000000001e-141Initial program 77.6%
Simplified75.8%
Taylor expanded in v around inf 73.5%
*-commutative73.5%
unpow273.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in r around 0 53.9%
unpow253.9%
Simplified53.9%
div-inv99.8%
pow299.8%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr54.0%
metadata-eval54.0%
pow-flip53.9%
pow253.9%
div-inv53.9%
associate-/r*53.9%
Applied egg-rr53.9%
if 2.0000000000000001e-141 < r Initial program 88.6%
associate--l-88.6%
+-commutative88.6%
associate--l+88.6%
+-commutative88.6%
associate--r+88.6%
metadata-eval88.6%
associate-*r*88.6%
*-commutative88.6%
associate-/l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in v around inf 89.1%
unpow289.1%
*-commutative89.1%
associate-*l*91.6%
*-commutative91.6%
Simplified91.6%
associate-/r/91.5%
*-commutative91.5%
Applied egg-rr91.5%
Final simplification66.3%
(FPCore (v w r) :precision binary64 (if (<= r 2.5e-141) (/ (/ 2.0 r) r) (+ (/ 2.0 (* r r)) (- -1.5 (/ r (/ 4.0 (* w (* r w))))))))
double code(double v, double w, double r) {
double tmp;
if (r <= 2.5e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - (r / (4.0 / (w * (r * w)))));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 2.5d-141) then
tmp = (2.0d0 / r) / r
else
tmp = (2.0d0 / (r * r)) + ((-1.5d0) - (r / (4.0d0 / (w * (r * w)))))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 2.5e-141) {
tmp = (2.0 / r) / r;
} else {
tmp = (2.0 / (r * r)) + (-1.5 - (r / (4.0 / (w * (r * w)))));
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 2.5e-141: tmp = (2.0 / r) / r else: tmp = (2.0 / (r * r)) + (-1.5 - (r / (4.0 / (w * (r * w))))) return tmp
function code(v, w, r) tmp = 0.0 if (r <= 2.5e-141) tmp = Float64(Float64(2.0 / r) / r); else tmp = Float64(Float64(2.0 / Float64(r * r)) + Float64(-1.5 - Float64(r / Float64(4.0 / Float64(w * Float64(r * w)))))); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 2.5e-141) tmp = (2.0 / r) / r; else tmp = (2.0 / (r * r)) + (-1.5 - (r / (4.0 / (w * (r * w))))); end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 2.5e-141], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + N[(-1.5 - N[(r / N[(4.0 / N[(w * N[(r * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 2.5 \cdot 10^{-141}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{r \cdot r} + \left(-1.5 - \frac{r}{\frac{4}{w \cdot \left(r \cdot w\right)}}\right)\\
\end{array}
\end{array}
if r < 2.5e-141Initial program 77.6%
Simplified75.8%
Taylor expanded in v around inf 73.5%
*-commutative73.5%
unpow273.5%
unpow273.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in r around 0 53.9%
unpow253.9%
Simplified53.9%
div-inv99.8%
pow299.8%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr54.0%
metadata-eval54.0%
pow-flip53.9%
pow253.9%
div-inv53.9%
associate-/r*53.9%
Applied egg-rr53.9%
if 2.5e-141 < r Initial program 88.6%
associate--l-88.6%
+-commutative88.6%
associate--l+88.6%
+-commutative88.6%
associate--r+88.6%
metadata-eval88.6%
associate-*r*88.6%
*-commutative88.6%
associate-/l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in v around inf 89.1%
unpow289.1%
*-commutative89.1%
associate-*l*91.6%
*-commutative91.6%
Simplified91.6%
Final simplification66.3%
(FPCore (v w r)
:precision binary64
(if (<= r 1.02e-7)
(/ (/ 2.0 r) r)
(if (or (<= r 1.15e+75) (not (<= r 9.2e+95)))
(* (* (* r r) (* w w)) -0.375)
(+ (/ 2.0 (* r r)) -1.5))))
double code(double v, double w, double r) {
double tmp;
if (r <= 1.02e-7) {
tmp = (2.0 / r) / r;
} else if ((r <= 1.15e+75) || !(r <= 9.2e+95)) {
tmp = ((r * r) * (w * w)) * -0.375;
} else {
tmp = (2.0 / (r * r)) + -1.5;
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 1.02d-7) then
tmp = (2.0d0 / r) / r
else if ((r <= 1.15d+75) .or. (.not. (r <= 9.2d+95))) then
tmp = ((r * r) * (w * w)) * (-0.375d0)
else
tmp = (2.0d0 / (r * r)) + (-1.5d0)
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 1.02e-7) {
tmp = (2.0 / r) / r;
} else if ((r <= 1.15e+75) || !(r <= 9.2e+95)) {
tmp = ((r * r) * (w * w)) * -0.375;
} else {
tmp = (2.0 / (r * r)) + -1.5;
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 1.02e-7: tmp = (2.0 / r) / r elif (r <= 1.15e+75) or not (r <= 9.2e+95): tmp = ((r * r) * (w * w)) * -0.375 else: tmp = (2.0 / (r * r)) + -1.5 return tmp
function code(v, w, r) tmp = 0.0 if (r <= 1.02e-7) tmp = Float64(Float64(2.0 / r) / r); elseif ((r <= 1.15e+75) || !(r <= 9.2e+95)) tmp = Float64(Float64(Float64(r * r) * Float64(w * w)) * -0.375); else tmp = Float64(Float64(2.0 / Float64(r * r)) + -1.5); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 1.02e-7) tmp = (2.0 / r) / r; elseif ((r <= 1.15e+75) || ~((r <= 9.2e+95))) tmp = ((r * r) * (w * w)) * -0.375; else tmp = (2.0 / (r * r)) + -1.5; end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 1.02e-7], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], If[Or[LessEqual[r, 1.15e+75], N[Not[LessEqual[r, 9.2e+95]], $MachinePrecision]], N[(N[(N[(r * r), $MachinePrecision] * N[(w * w), $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision], N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 1.02 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{elif}\;r \leq 1.15 \cdot 10^{+75} \lor \neg \left(r \leq 9.2 \cdot 10^{+95}\right):\\
\;\;\;\;\left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right) \cdot -0.375\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{r \cdot r} + -1.5\\
\end{array}
\end{array}
if r < 1.02e-7Initial program 79.2%
Simplified77.7%
Taylor expanded in v around inf 75.6%
*-commutative75.6%
unpow275.6%
unpow275.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in r around 0 56.3%
unpow256.3%
Simplified56.3%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr56.5%
metadata-eval56.5%
pow-flip56.3%
pow256.3%
div-inv56.3%
associate-/r*56.4%
Applied egg-rr56.4%
if 1.02e-7 < r < 1.1499999999999999e75 or 9.19999999999999989e95 < r Initial program 86.7%
Simplified78.8%
Taylor expanded in v around 0 73.8%
*-commutative73.8%
unpow273.8%
unpow273.8%
*-commutative73.8%
swap-sqr88.0%
unpow288.0%
*-commutative88.0%
Simplified88.0%
*-commutative88.0%
unpow288.0%
Applied egg-rr88.0%
Taylor expanded in r around inf 66.4%
*-commutative66.4%
unpow266.4%
*-commutative66.4%
unpow266.4%
Simplified66.4%
if 1.1499999999999999e75 < r < 9.19999999999999989e95Initial program 100.0%
Simplified100.0%
Taylor expanded in v around inf 100.0%
*-commutative100.0%
unpow2100.0%
unpow2100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in r around 0 100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
unpow2100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification59.1%
(FPCore (v w r) :precision binary64 (if (<= r 4e-6) (/ (/ 2.0 r) r) (* -0.25 (* (* r r) (* w w)))))
double code(double v, double w, double r) {
double tmp;
if (r <= 4e-6) {
tmp = (2.0 / r) / r;
} else {
tmp = -0.25 * ((r * r) * (w * w));
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 4d-6) then
tmp = (2.0d0 / r) / r
else
tmp = (-0.25d0) * ((r * r) * (w * w))
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 4e-6) {
tmp = (2.0 / r) / r;
} else {
tmp = -0.25 * ((r * r) * (w * w));
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 4e-6: tmp = (2.0 / r) / r else: tmp = -0.25 * ((r * r) * (w * w)) return tmp
function code(v, w, r) tmp = 0.0 if (r <= 4e-6) tmp = Float64(Float64(2.0 / r) / r); else tmp = Float64(-0.25 * Float64(Float64(r * r) * Float64(w * w))); end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 4e-6) tmp = (2.0 / r) / r; else tmp = -0.25 * ((r * r) * (w * w)); end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 4e-6], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], N[(-0.25 * N[(N[(r * r), $MachinePrecision] * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 4 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;-0.25 \cdot \left(\left(r \cdot r\right) \cdot \left(w \cdot w\right)\right)\\
\end{array}
\end{array}
if r < 3.99999999999999982e-6Initial program 79.2%
Simplified77.7%
Taylor expanded in v around inf 75.6%
*-commutative75.6%
unpow275.6%
unpow275.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in r around 0 56.3%
unpow256.3%
Simplified56.3%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr56.5%
metadata-eval56.5%
pow-flip56.3%
pow256.3%
div-inv56.3%
associate-/r*56.4%
Applied egg-rr56.4%
if 3.99999999999999982e-6 < r Initial program 86.9%
associate--l-86.9%
+-commutative86.9%
associate--l+86.9%
+-commutative86.9%
associate--r+86.9%
metadata-eval86.9%
associate-*r*86.9%
*-commutative86.9%
associate-/l*91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in v around inf 87.5%
unpow287.5%
*-commutative87.5%
associate-*l*90.7%
*-commutative90.7%
Simplified90.7%
associate-/r/90.7%
*-commutative90.7%
Applied egg-rr90.7%
Taylor expanded in r around inf 68.2%
*-commutative68.2%
unpow268.2%
*-commutative68.2%
unpow268.2%
Simplified68.2%
Final simplification59.4%
(FPCore (v w r) :precision binary64 (if (<= r 0.00031) (/ 2.0 (* r r)) -4.5))
double code(double v, double w, double r) {
double tmp;
if (r <= 0.00031) {
tmp = 2.0 / (r * r);
} else {
tmp = -4.5;
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 0.00031d0) then
tmp = 2.0d0 / (r * r)
else
tmp = -4.5d0
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 0.00031) {
tmp = 2.0 / (r * r);
} else {
tmp = -4.5;
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 0.00031: tmp = 2.0 / (r * r) else: tmp = -4.5 return tmp
function code(v, w, r) tmp = 0.0 if (r <= 0.00031) tmp = Float64(2.0 / Float64(r * r)); else tmp = -4.5; end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 0.00031) tmp = 2.0 / (r * r); else tmp = -4.5; end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 0.00031], N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision], -4.5]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 0.00031:\\
\;\;\;\;\frac{2}{r \cdot r}\\
\mathbf{else}:\\
\;\;\;\;-4.5\\
\end{array}
\end{array}
if r < 3.1e-4Initial program 79.2%
Simplified77.7%
Taylor expanded in v around inf 75.6%
*-commutative75.6%
unpow275.6%
unpow275.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in r around 0 56.3%
unpow256.3%
Simplified56.3%
if 3.1e-4 < r Initial program 86.9%
Simplified79.1%
*-commutative79.1%
*-un-lft-identity79.1%
times-frac79.1%
+-commutative79.1%
fma-def79.1%
unswap-sqr99.8%
pow299.8%
Applied egg-rr99.8%
Taylor expanded in v around inf 59.7%
associate-*r/59.7%
*-commutative59.7%
unpow259.7%
unpow259.7%
swap-sqr70.2%
unpow270.2%
associate-/l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in r around 0 6.0%
unpow26.0%
Simplified6.0%
Taylor expanded in r around inf 6.0%
Final simplification43.6%
(FPCore (v w r) :precision binary64 (if (<= r 0.00031) (/ (/ 2.0 r) r) -4.5))
double code(double v, double w, double r) {
double tmp;
if (r <= 0.00031) {
tmp = (2.0 / r) / r;
} else {
tmp = -4.5;
}
return tmp;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
real(8) :: tmp
if (r <= 0.00031d0) then
tmp = (2.0d0 / r) / r
else
tmp = -4.5d0
end if
code = tmp
end function
public static double code(double v, double w, double r) {
double tmp;
if (r <= 0.00031) {
tmp = (2.0 / r) / r;
} else {
tmp = -4.5;
}
return tmp;
}
def code(v, w, r): tmp = 0 if r <= 0.00031: tmp = (2.0 / r) / r else: tmp = -4.5 return tmp
function code(v, w, r) tmp = 0.0 if (r <= 0.00031) tmp = Float64(Float64(2.0 / r) / r); else tmp = -4.5; end return tmp end
function tmp_2 = code(v, w, r) tmp = 0.0; if (r <= 0.00031) tmp = (2.0 / r) / r; else tmp = -4.5; end tmp_2 = tmp; end
code[v_, w_, r_] := If[LessEqual[r, 0.00031], N[(N[(2.0 / r), $MachinePrecision] / r), $MachinePrecision], -4.5]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;r \leq 0.00031:\\
\;\;\;\;\frac{\frac{2}{r}}{r}\\
\mathbf{else}:\\
\;\;\;\;-4.5\\
\end{array}
\end{array}
if r < 3.1e-4Initial program 79.2%
Simplified77.7%
Taylor expanded in v around inf 75.6%
*-commutative75.6%
unpow275.6%
unpow275.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in r around 0 56.3%
unpow256.3%
Simplified56.3%
div-inv99.7%
pow299.7%
pow-flip99.9%
metadata-eval99.9%
Applied egg-rr56.5%
metadata-eval56.5%
pow-flip56.3%
pow256.3%
div-inv56.3%
associate-/r*56.4%
Applied egg-rr56.4%
if 3.1e-4 < r Initial program 86.9%
Simplified79.1%
*-commutative79.1%
*-un-lft-identity79.1%
times-frac79.1%
+-commutative79.1%
fma-def79.1%
unswap-sqr99.8%
pow299.8%
Applied egg-rr99.8%
Taylor expanded in v around inf 59.7%
associate-*r/59.7%
*-commutative59.7%
unpow259.7%
unpow259.7%
swap-sqr70.2%
unpow270.2%
associate-/l*70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in r around 0 6.0%
unpow26.0%
Simplified6.0%
Taylor expanded in r around inf 6.0%
Final simplification43.6%
(FPCore (v w r) :precision binary64 (+ -4.5 (/ 2.0 (* r r))))
double code(double v, double w, double r) {
return -4.5 + (2.0 / (r * r));
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = (-4.5d0) + (2.0d0 / (r * r))
end function
public static double code(double v, double w, double r) {
return -4.5 + (2.0 / (r * r));
}
def code(v, w, r): return -4.5 + (2.0 / (r * r))
function code(v, w, r) return Float64(-4.5 + Float64(2.0 / Float64(r * r))) end
function tmp = code(v, w, r) tmp = -4.5 + (2.0 / (r * r)); end
code[v_, w_, r_] := N[(-4.5 + N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 + \frac{2}{r \cdot r}
\end{array}
Initial program 81.2%
Simplified78.0%
*-commutative78.0%
*-un-lft-identity78.0%
times-frac78.0%
+-commutative78.0%
fma-def78.0%
unswap-sqr99.7%
pow299.7%
Applied egg-rr99.7%
Taylor expanded in v around inf 66.2%
associate-*r/66.2%
*-commutative66.2%
unpow266.2%
unpow266.2%
swap-sqr83.1%
unpow283.1%
associate-/l*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in r around 0 45.2%
unpow245.2%
Simplified45.2%
Final simplification45.2%
(FPCore (v w r) :precision binary64 (+ (/ 2.0 (* r r)) -1.5))
double code(double v, double w, double r) {
return (2.0 / (r * r)) + -1.5;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = (2.0d0 / (r * r)) + (-1.5d0)
end function
public static double code(double v, double w, double r) {
return (2.0 / (r * r)) + -1.5;
}
def code(v, w, r): return (2.0 / (r * r)) + -1.5
function code(v, w, r) return Float64(Float64(2.0 / Float64(r * r)) + -1.5) end
function tmp = code(v, w, r) tmp = (2.0 / (r * r)) + -1.5; end
code[v_, w_, r_] := N[(N[(2.0 / N[(r * r), $MachinePrecision]), $MachinePrecision] + -1.5), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{r \cdot r} + -1.5
\end{array}
Initial program 81.2%
Simplified78.0%
Taylor expanded in v around inf 75.7%
*-commutative75.7%
unpow275.7%
unpow275.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in r around 0 54.3%
sub-neg54.3%
associate-*r/54.3%
metadata-eval54.3%
unpow254.3%
metadata-eval54.3%
Simplified54.3%
Final simplification54.3%
(FPCore (v w r) :precision binary64 -4.5)
double code(double v, double w, double r) {
return -4.5;
}
real(8) function code(v, w, r)
real(8), intent (in) :: v
real(8), intent (in) :: w
real(8), intent (in) :: r
code = -4.5d0
end function
public static double code(double v, double w, double r) {
return -4.5;
}
def code(v, w, r): return -4.5
function code(v, w, r) return -4.5 end
function tmp = code(v, w, r) tmp = -4.5; end
code[v_, w_, r_] := -4.5
\begin{array}{l}
\\
-4.5
\end{array}
Initial program 81.2%
Simplified78.0%
*-commutative78.0%
*-un-lft-identity78.0%
times-frac78.0%
+-commutative78.0%
fma-def78.0%
unswap-sqr99.7%
pow299.7%
Applied egg-rr99.7%
Taylor expanded in v around inf 66.2%
associate-*r/66.2%
*-commutative66.2%
unpow266.2%
unpow266.2%
swap-sqr83.1%
unpow283.1%
associate-/l*83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in r around 0 45.2%
unpow245.2%
Simplified45.2%
Taylor expanded in r around inf 4.2%
Final simplification4.2%
herbie shell --seed 2023285
(FPCore (v w r)
:name "Rosa's TurbineBenchmark"
:precision binary64
(- (- (+ 3.0 (/ 2.0 (* r r))) (/ (* (* 0.125 (- 3.0 (* 2.0 v))) (* (* (* w w) r) r)) (- 1.0 v))) 4.5))