
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 83.7%
clear-num83.7%
inv-pow83.7%
Applied egg-rr83.7%
unpow-183.7%
*-commutative83.7%
associate-/r*97.4%
Simplified97.4%
clear-num97.5%
add-cube-cbrt96.8%
associate-/l*96.8%
pow296.8%
Applied egg-rr96.8%
associate-*r/96.8%
unpow296.8%
rem-3cbrt-lft97.5%
Simplified97.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ a y)))))
(if (<= z -1.6e+117)
(+ x y)
(if (<= z -2.8e+56)
(* (- t z) (/ y (- a z)))
(if (<= z -6.2e-13)
(- x (* z (/ y a)))
(if (<= z -3e-127)
t_1
(if (<= z -2.9e-127)
(* t (/ y (- z)))
(if (<= z 5e-55) t_1 (+ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (z <= -1.6e+117) {
tmp = x + y;
} else if (z <= -2.8e+56) {
tmp = (t - z) * (y / (a - z));
} else if (z <= -6.2e-13) {
tmp = x - (z * (y / a));
} else if (z <= -3e-127) {
tmp = t_1;
} else if (z <= -2.9e-127) {
tmp = t * (y / -z);
} else if (z <= 5e-55) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t / (a / y))
if (z <= (-1.6d+117)) then
tmp = x + y
else if (z <= (-2.8d+56)) then
tmp = (t - z) * (y / (a - z))
else if (z <= (-6.2d-13)) then
tmp = x - (z * (y / a))
else if (z <= (-3d-127)) then
tmp = t_1
else if (z <= (-2.9d-127)) then
tmp = t * (y / -z)
else if (z <= 5d-55) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (z <= -1.6e+117) {
tmp = x + y;
} else if (z <= -2.8e+56) {
tmp = (t - z) * (y / (a - z));
} else if (z <= -6.2e-13) {
tmp = x - (z * (y / a));
} else if (z <= -3e-127) {
tmp = t_1;
} else if (z <= -2.9e-127) {
tmp = t * (y / -z);
} else if (z <= 5e-55) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / (a / y)) tmp = 0 if z <= -1.6e+117: tmp = x + y elif z <= -2.8e+56: tmp = (t - z) * (y / (a - z)) elif z <= -6.2e-13: tmp = x - (z * (y / a)) elif z <= -3e-127: tmp = t_1 elif z <= -2.9e-127: tmp = t * (y / -z) elif z <= 5e-55: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(a / y))) tmp = 0.0 if (z <= -1.6e+117) tmp = Float64(x + y); elseif (z <= -2.8e+56) tmp = Float64(Float64(t - z) * Float64(y / Float64(a - z))); elseif (z <= -6.2e-13) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -3e-127) tmp = t_1; elseif (z <= -2.9e-127) tmp = Float64(t * Float64(y / Float64(-z))); elseif (z <= 5e-55) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / (a / y)); tmp = 0.0; if (z <= -1.6e+117) tmp = x + y; elseif (z <= -2.8e+56) tmp = (t - z) * (y / (a - z)); elseif (z <= -6.2e-13) tmp = x - (z * (y / a)); elseif (z <= -3e-127) tmp = t_1; elseif (z <= -2.9e-127) tmp = t * (y / -z); elseif (z <= 5e-55) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+117], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.8e+56], N[(N[(t - z), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-13], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-127], t$95$1, If[LessEqual[z, -2.9e-127], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-55], t$95$1, N[(x + y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+117}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+56}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-13}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-127}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.60000000000000002e117 or 5.0000000000000002e-55 < z Initial program 71.7%
+-commutative71.7%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.4%
+-commutative77.4%
Simplified77.4%
if -1.60000000000000002e117 < z < -2.80000000000000008e56Initial program 90.9%
+-commutative90.9%
associate-/l*99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around inf 73.6%
div-sub73.5%
associate-*r/64.8%
associate-*l/73.6%
Simplified73.6%
if -2.80000000000000008e56 < z < -6.1999999999999998e-13Initial program 90.5%
Taylor expanded in t around 0 80.9%
associate-/l*90.3%
Simplified90.3%
Taylor expanded in z around 0 71.0%
associate-*r/71.0%
mul-1-neg71.0%
*-commutative71.0%
distribute-rgt-neg-in71.0%
Simplified71.0%
div-inv71.0%
add-sqr-sqrt50.7%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod20.3%
add-sqr-sqrt50.9%
distribute-rgt-neg-in50.9%
cancel-sign-sub-inv50.9%
div-inv50.9%
associate-/l*50.9%
add-sqr-sqrt20.3%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod60.3%
add-sqr-sqrt80.3%
Applied egg-rr80.3%
if -6.1999999999999998e-13 < z < -3.00000000000000009e-127 or -2.9e-127 < z < 5.0000000000000002e-55Initial program 93.6%
+-commutative93.6%
associate-/l*93.6%
fma-define93.6%
Simplified93.6%
Taylor expanded in z around 0 76.7%
+-commutative76.7%
associate-/l*82.1%
Simplified82.1%
clear-num82.1%
un-div-inv82.9%
Applied egg-rr82.9%
if -3.00000000000000009e-127 < z < -2.9e-127Initial program 100.0%
+-commutative100.0%
associate-/l*100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
associate-+r+100.0%
associate--l+100.0%
distribute-lft-out--100.0%
div-sub100.0%
associate-+r+100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
div-sub100.0%
associate-/l*100.0%
associate-/l*100.0%
distribute-rgt-out--100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
mul-1-neg100.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification80.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -1.45e+57)
t_1
(if (<= z 1.6e-32)
(+ x (/ t (/ a y)))
(if (or (<= z 5.8e+94) (not (<= z 6.2e+94)))
t_1
(- x (* y (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -1.45e+57) {
tmp = t_1;
} else if (z <= 1.6e-32) {
tmp = x + (t / (a / y));
} else if ((z <= 5.8e+94) || !(z <= 6.2e+94)) {
tmp = t_1;
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-1.45d+57)) then
tmp = t_1
else if (z <= 1.6d-32) then
tmp = x + (t / (a / y))
else if ((z <= 5.8d+94) .or. (.not. (z <= 6.2d+94))) then
tmp = t_1
else
tmp = x - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -1.45e+57) {
tmp = t_1;
} else if (z <= 1.6e-32) {
tmp = x + (t / (a / y));
} else if ((z <= 5.8e+94) || !(z <= 6.2e+94)) {
tmp = t_1;
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -1.45e+57: tmp = t_1 elif z <= 1.6e-32: tmp = x + (t / (a / y)) elif (z <= 5.8e+94) or not (z <= 6.2e+94): tmp = t_1 else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -1.45e+57) tmp = t_1; elseif (z <= 1.6e-32) tmp = Float64(x + Float64(t / Float64(a / y))); elseif ((z <= 5.8e+94) || !(z <= 6.2e+94)) tmp = t_1; else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -1.45e+57) tmp = t_1; elseif (z <= 1.6e-32) tmp = x + (t / (a / y)); elseif ((z <= 5.8e+94) || ~((z <= 6.2e+94))) tmp = t_1; else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+57], t$95$1, If[LessEqual[z, 1.6e-32], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 5.8e+94], N[Not[LessEqual[z, 6.2e+94]], $MachinePrecision]], t$95$1, N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+94} \lor \neg \left(z \leq 6.2 \cdot 10^{+94}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -1.4500000000000001e57 or 1.6000000000000001e-32 < z < 5.7999999999999997e94 or 6.19999999999999983e94 < z Initial program 72.4%
Taylor expanded in a around 0 62.0%
associate-/l*86.9%
div-sub86.9%
*-inverses86.9%
Simplified86.9%
if -1.4500000000000001e57 < z < 1.6000000000000001e-32Initial program 92.6%
+-commutative92.6%
associate-/l*94.5%
fma-define94.5%
Simplified94.5%
Taylor expanded in z around 0 74.0%
+-commutative74.0%
associate-/l*79.9%
Simplified79.9%
clear-num79.9%
un-div-inv80.5%
Applied egg-rr80.5%
if 5.7999999999999997e94 < z < 6.19999999999999983e94Initial program 100.0%
Taylor expanded in t around 0 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
associate-*r/100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
associate-*r/100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub-inv100.0%
Simplified100.0%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.35e+123)
(- x (/ y (/ z (- t z))))
(if (<= z -3.2e-49)
(+ x (* y (/ (- t z) a)))
(if (<= z 5.4e-55)
(+ x (/ t (/ a y)))
(+ x (* y (/ -1.0 (/ (- a z) z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+123) {
tmp = x - (y / (z / (t - z)));
} else if (z <= -3.2e-49) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 5.4e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (-1.0 / ((a - z) / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.35d+123)) then
tmp = x - (y / (z / (t - z)))
else if (z <= (-3.2d-49)) then
tmp = x + (y * ((t - z) / a))
else if (z <= 5.4d-55) then
tmp = x + (t / (a / y))
else
tmp = x + (y * ((-1.0d0) / ((a - z) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+123) {
tmp = x - (y / (z / (t - z)));
} else if (z <= -3.2e-49) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 5.4e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (-1.0 / ((a - z) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.35e+123: tmp = x - (y / (z / (t - z))) elif z <= -3.2e-49: tmp = x + (y * ((t - z) / a)) elif z <= 5.4e-55: tmp = x + (t / (a / y)) else: tmp = x + (y * (-1.0 / ((a - z) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.35e+123) tmp = Float64(x - Float64(y / Float64(z / Float64(t - z)))); elseif (z <= -3.2e-49) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (z <= 5.4e-55) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(-1.0 / Float64(Float64(a - z) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.35e+123) tmp = x - (y / (z / (t - z))); elseif (z <= -3.2e-49) tmp = x + (y * ((t - z) / a)); elseif (z <= 5.4e-55) tmp = x + (t / (a / y)); else tmp = x + (y * (-1.0 / ((a - z) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.35e+123], N[(x - N[(y / N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-49], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-55], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-1.0 / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+123}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t - z}}\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-49}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-1}{\frac{a - z}{z}}\\
\end{array}
\end{array}
if z < -2.3499999999999999e123Initial program 63.5%
clear-num63.5%
inv-pow63.5%
Applied egg-rr63.5%
unpow-163.5%
*-commutative63.5%
associate-/r*99.9%
Simplified99.9%
clear-num100.0%
add-cube-cbrt98.9%
associate-/l*98.9%
pow298.9%
Applied egg-rr98.9%
associate-*r/98.9%
unpow298.9%
rem-3cbrt-lft100.0%
Simplified100.0%
Taylor expanded in a around 0 94.2%
if -2.3499999999999999e123 < z < -3.20000000000000002e-49Initial program 86.9%
+-commutative86.9%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around inf 66.5%
mul-1-neg66.5%
unsub-neg66.5%
associate-/l*79.4%
Simplified79.4%
if -3.20000000000000002e-49 < z < 5.40000000000000008e-55Initial program 94.2%
+-commutative94.2%
associate-/l*93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in z around 0 76.8%
+-commutative76.8%
associate-/l*81.6%
Simplified81.6%
clear-num81.5%
un-div-inv82.3%
Applied egg-rr82.3%
if 5.40000000000000008e-55 < z Initial program 77.2%
Taylor expanded in t around 0 65.4%
associate-/l*83.9%
Simplified83.9%
clear-num84.0%
inv-pow84.0%
Applied egg-rr84.0%
unpow-184.0%
Simplified84.0%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+123)
(- x (/ y (/ z (- t z))))
(if (<= z -2e-47)
(+ x (* y (/ (- t z) a)))
(if (<= z 5.5e-55) (+ x (/ t (/ a y))) (+ x (* y (/ z (- z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+123) {
tmp = x - (y / (z / (t - z)));
} else if (z <= -2e-47) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 5.5e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.65d+123)) then
tmp = x - (y / (z / (t - z)))
else if (z <= (-2d-47)) then
tmp = x + (y * ((t - z) / a))
else if (z <= 5.5d-55) then
tmp = x + (t / (a / y))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+123) {
tmp = x - (y / (z / (t - z)));
} else if (z <= -2e-47) {
tmp = x + (y * ((t - z) / a));
} else if (z <= 5.5e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+123: tmp = x - (y / (z / (t - z))) elif z <= -2e-47: tmp = x + (y * ((t - z) / a)) elif z <= 5.5e-55: tmp = x + (t / (a / y)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+123) tmp = Float64(x - Float64(y / Float64(z / Float64(t - z)))); elseif (z <= -2e-47) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (z <= 5.5e-55) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+123) tmp = x - (y / (z / (t - z))); elseif (z <= -2e-47) tmp = x + (y * ((t - z) / a)); elseif (z <= 5.5e-55) tmp = x + (t / (a / y)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+123], N[(x - N[(y / N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-47], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-55], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+123}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t - z}}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.65000000000000001e123Initial program 63.5%
clear-num63.5%
inv-pow63.5%
Applied egg-rr63.5%
unpow-163.5%
*-commutative63.5%
associate-/r*99.9%
Simplified99.9%
clear-num100.0%
add-cube-cbrt98.9%
associate-/l*98.9%
pow298.9%
Applied egg-rr98.9%
associate-*r/98.9%
unpow298.9%
rem-3cbrt-lft100.0%
Simplified100.0%
Taylor expanded in a around 0 94.2%
if -1.65000000000000001e123 < z < -1.9999999999999999e-47Initial program 86.9%
+-commutative86.9%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in a around inf 66.5%
mul-1-neg66.5%
unsub-neg66.5%
associate-/l*79.4%
Simplified79.4%
if -1.9999999999999999e-47 < z < 5.4999999999999999e-55Initial program 94.2%
+-commutative94.2%
associate-/l*93.4%
fma-define93.4%
Simplified93.4%
Taylor expanded in z around 0 76.8%
+-commutative76.8%
associate-/l*81.6%
Simplified81.6%
clear-num81.5%
un-div-inv82.3%
Applied egg-rr82.3%
if 5.4999999999999999e-55 < z Initial program 77.2%
Taylor expanded in t around 0 65.4%
associate-/l*83.9%
Simplified83.9%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e+45) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 5.2e-55) (+ x (/ t (/ a y))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 5.2e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.2d+45)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 5.2d-55) then
tmp = x + (t / (a / y))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 5.2e-55) {
tmp = x + (t / (a / y));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e+45: tmp = x + (y * (1.0 - (t / z))) elif z <= 5.2e-55: tmp = x + (t / (a / y)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e+45) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 5.2e-55) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e+45) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 5.2e-55) tmp = x + (t / (a / y)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+45], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-55], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -4.1999999999999999e45Initial program 71.1%
Taylor expanded in a around 0 59.3%
associate-/l*86.3%
div-sub86.3%
*-inverses86.3%
Simplified86.3%
if -4.1999999999999999e45 < z < 5.1999999999999998e-55Initial program 92.7%
+-commutative92.7%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in z around 0 74.9%
+-commutative74.9%
associate-/l*80.6%
Simplified80.6%
clear-num80.6%
un-div-inv81.3%
Applied egg-rr81.3%
if 5.1999999999999998e-55 < z Initial program 77.2%
Taylor expanded in t around 0 65.4%
associate-/l*83.9%
Simplified83.9%
Final simplification83.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+153) (not (<= z 5e-55))) (+ x y) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+153) || !(z <= 5e-55)) {
tmp = x + y;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d+153)) .or. (.not. (z <= 5d-55))) then
tmp = x + y
else
tmp = x + (t / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+153) || !(z <= 5e-55)) {
tmp = x + y;
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+153) or not (z <= 5e-55): tmp = x + y else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+153) || !(z <= 5e-55)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+153) || ~((z <= 5e-55))) tmp = x + y; else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+153], N[Not[LessEqual[z, 5e-55]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+153} \lor \neg \left(z \leq 5 \cdot 10^{-55}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.89999999999999983e153 or 5.0000000000000002e-55 < z Initial program 69.2%
+-commutative69.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
+-commutative77.3%
Simplified77.3%
if -1.89999999999999983e153 < z < 5.0000000000000002e-55Initial program 93.6%
+-commutative93.6%
associate-/l*94.9%
fma-define94.9%
Simplified94.9%
Taylor expanded in z around 0 73.1%
+-commutative73.1%
associate-/l*78.1%
Simplified78.1%
clear-num78.1%
un-div-inv78.7%
Applied egg-rr78.7%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e+153) (not (<= z 5e-55))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+153) || !(z <= 5e-55)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.6d+153)) .or. (.not. (z <= 5d-55))) then
tmp = x + y
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+153) || !(z <= 5e-55)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e+153) or not (z <= 5e-55): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e+153) || !(z <= 5e-55)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6e+153) || ~((z <= 5e-55))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+153], N[Not[LessEqual[z, 5e-55]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+153} \lor \neg \left(z \leq 5 \cdot 10^{-55}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.5999999999999999e153 or 5.0000000000000002e-55 < z Initial program 69.2%
+-commutative69.2%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 77.3%
+-commutative77.3%
Simplified77.3%
if -2.5999999999999999e153 < z < 5.0000000000000002e-55Initial program 93.6%
+-commutative93.6%
associate-/l*94.9%
fma-define94.9%
Simplified94.9%
Taylor expanded in z around 0 73.1%
+-commutative73.1%
associate-/l*78.1%
Simplified78.1%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+153) (not (<= z 1.05e-67))) (+ x y) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+153) || !(z <= 1.05e-67)) {
tmp = x + y;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d+153)) .or. (.not. (z <= 1.05d-67))) then
tmp = x + y
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+153) || !(z <= 1.05e-67)) {
tmp = x + y;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+153) or not (z <= 1.05e-67): tmp = x + y else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+153) || !(z <= 1.05e-67)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+153) || ~((z <= 1.05e-67))) tmp = x + y; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+153], N[Not[LessEqual[z, 1.05e-67]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+153} \lor \neg \left(z \leq 1.05 \cdot 10^{-67}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.89999999999999983e153 or 1.0500000000000001e-67 < z Initial program 69.8%
+-commutative69.8%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -1.89999999999999983e153 < z < 1.0500000000000001e-67Initial program 93.6%
Taylor expanded in z around 0 72.8%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.9e-171) (not (<= x 1.12e-219))) (+ x y) (* y (- 1.0 (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.9e-171) || !(x <= 1.12e-219)) {
tmp = x + y;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-6.9d-171)) .or. (.not. (x <= 1.12d-219))) then
tmp = x + y
else
tmp = y * (1.0d0 - (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.9e-171) || !(x <= 1.12e-219)) {
tmp = x + y;
} else {
tmp = y * (1.0 - (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.9e-171) or not (x <= 1.12e-219): tmp = x + y else: tmp = y * (1.0 - (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.9e-171) || !(x <= 1.12e-219)) tmp = Float64(x + y); else tmp = Float64(y * Float64(1.0 - Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.9e-171) || ~((x <= 1.12e-219))) tmp = x + y; else tmp = y * (1.0 - (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.9e-171], N[Not[LessEqual[x, 1.12e-219]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.9 \cdot 10^{-171} \lor \neg \left(x \leq 1.12 \cdot 10^{-219}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if x < -6.89999999999999979e-171 or 1.12e-219 < x Initial program 84.6%
+-commutative84.6%
associate-/l*96.6%
fma-define96.6%
Simplified96.6%
Taylor expanded in z around inf 64.9%
+-commutative64.9%
Simplified64.9%
if -6.89999999999999979e-171 < x < 1.12e-219Initial program 80.8%
+-commutative80.8%
associate-/l*98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in y around -inf 69.3%
Taylor expanded in a around 0 43.6%
associate-/l*57.9%
div-sub57.9%
*-inverses57.9%
Simplified56.0%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.4e-202) (not (<= x 4.6e-285))) (+ x y) (* t (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.4e-202) || !(x <= 4.6e-285)) {
tmp = x + y;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-6.4d-202)) .or. (.not. (x <= 4.6d-285))) then
tmp = x + y
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.4e-202) || !(x <= 4.6e-285)) {
tmp = x + y;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -6.4e-202) or not (x <= 4.6e-285): tmp = x + y else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.4e-202) || !(x <= 4.6e-285)) tmp = Float64(x + y); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -6.4e-202) || ~((x <= 4.6e-285))) tmp = x + y; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.4e-202], N[Not[LessEqual[x, 4.6e-285]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{-202} \lor \neg \left(x \leq 4.6 \cdot 10^{-285}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if x < -6.4000000000000002e-202 or 4.59999999999999993e-285 < x Initial program 84.8%
+-commutative84.8%
associate-/l*96.4%
fma-define96.4%
Simplified96.4%
Taylor expanded in z around inf 62.2%
+-commutative62.2%
Simplified62.2%
if -6.4000000000000002e-202 < x < 4.59999999999999993e-285Initial program 77.6%
+-commutative77.6%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in y around -inf 65.7%
Taylor expanded in z around 0 36.7%
associate-/l*41.6%
Simplified41.6%
Final simplification59.2%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + y
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 83.7%
+-commutative83.7%
associate-/l*96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in z around inf 57.5%
+-commutative57.5%
Simplified57.5%
Final simplification57.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 83.7%
+-commutative83.7%
associate-/l*96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in y around 0 47.5%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024107
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))