
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - 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 - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* y (- z t)) (- a t)))))
(if (or (<= t_1 -5e-237) (not (<= t_1 0.0)))
(+ x (+ y (/ y (/ (- a t) (- t z)))))
(+ x (/ (* y (- z a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((y * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) {
tmp = x + (y + (y / ((a - t) / (t - z))));
} else {
tmp = x + ((y * (z - a)) / t);
}
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) - ((y * (z - t)) / (a - t))
if ((t_1 <= (-5d-237)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + (y + (y / ((a - t) / (t - z))))
else
tmp = x + ((y * (z - a)) / t)
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) - ((y * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) {
tmp = x + (y + (y / ((a - t) / (t - z))));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((y * (z - t)) / (a - t)) tmp = 0 if (t_1 <= -5e-237) or not (t_1 <= 0.0): tmp = x + (y + (y / ((a - t) / (t - z)))) else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(y * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -5e-237) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(y + Float64(y / Float64(Float64(a - t) / Float64(t - z))))); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((y * (z - t)) / (a - t)); tmp = 0.0; if ((t_1 <= -5e-237) || ~((t_1 <= 0.0))) tmp = x + (y + (y / ((a - t) / (t - z)))); else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-237], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(y + N[(y / N[(N[(a - t), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-237} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(y + \frac{y}{\frac{a - t}{t - z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.0000000000000002e-237 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 79.4%
sub-neg79.4%
+-commutative79.4%
distribute-frac-neg79.4%
distribute-rgt-neg-out79.4%
associate-/l*88.1%
fma-define88.4%
distribute-frac-neg88.4%
distribute-neg-frac288.4%
sub-neg88.4%
distribute-neg-in88.4%
remove-double-neg88.4%
+-commutative88.4%
sub-neg88.4%
Simplified88.4%
Taylor expanded in y around 0 92.2%
associate--l+92.2%
div-sub92.2%
Simplified92.2%
clear-num92.2%
inv-pow92.2%
Applied egg-rr92.2%
unpow-192.2%
Simplified92.2%
clear-num92.2%
associate-/r/91.8%
Applied egg-rr91.8%
+-commutative91.8%
distribute-lft-in91.8%
un-div-inv91.9%
associate-*l/92.3%
*-un-lft-identity92.3%
*-rgt-identity92.3%
Applied egg-rr92.3%
if -5.0000000000000002e-237 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.5%
sub-neg4.5%
+-commutative4.5%
distribute-frac-neg4.5%
distribute-rgt-neg-out4.5%
associate-/l*4.2%
fma-define3.7%
distribute-frac-neg3.7%
distribute-neg-frac23.7%
sub-neg3.7%
distribute-neg-in3.7%
remove-double-neg3.7%
+-commutative3.7%
sub-neg3.7%
Simplified3.7%
Taylor expanded in y around 0 40.4%
associate--l+40.4%
div-sub40.4%
Simplified40.4%
Taylor expanded in t around -inf 99.9%
Final simplification92.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.5e-192) (not (<= a 5.6e-176))) (+ x (* y (+ (/ (- t z) (- a t)) 1.0))) (+ x (/ -1.0 (/ (/ t y) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-192) || !(a <= 5.6e-176)) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} else {
tmp = x + (-1.0 / ((t / y) / (a - 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 ((a <= (-3.5d-192)) .or. (.not. (a <= 5.6d-176))) then
tmp = x + (y * (((t - z) / (a - t)) + 1.0d0))
else
tmp = x + ((-1.0d0) / ((t / y) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-192) || !(a <= 5.6e-176)) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} else {
tmp = x + (-1.0 / ((t / y) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.5e-192) or not (a <= 5.6e-176): tmp = x + (y * (((t - z) / (a - t)) + 1.0)) else: tmp = x + (-1.0 / ((t / y) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.5e-192) || !(a <= 5.6e-176)) tmp = Float64(x + Float64(y * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0))); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(t / y) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.5e-192) || ~((a <= 5.6e-176))) tmp = x + (y * (((t - z) / (a - t)) + 1.0)); else tmp = x + (-1.0 / ((t / y) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-192], N[Not[LessEqual[a, 5.6e-176]], $MachinePrecision]], N[(x + N[(y * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-192} \lor \neg \left(a \leq 5.6 \cdot 10^{-176}\right):\\
\;\;\;\;x + y \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{t}{y}}{a - z}}\\
\end{array}
\end{array}
if a < -3.50000000000000014e-192 or 5.6000000000000003e-176 < a Initial program 74.7%
sub-neg74.7%
+-commutative74.7%
distribute-frac-neg74.7%
distribute-rgt-neg-out74.7%
associate-/l*83.8%
fma-define84.0%
distribute-frac-neg84.0%
distribute-neg-frac284.0%
sub-neg84.0%
distribute-neg-in84.0%
remove-double-neg84.0%
+-commutative84.0%
sub-neg84.0%
Simplified84.0%
Taylor expanded in y around 0 91.3%
associate--l+91.3%
div-sub91.3%
Simplified91.3%
if -3.50000000000000014e-192 < a < 5.6000000000000003e-176Initial program 66.5%
sub-neg66.5%
+-commutative66.5%
distribute-frac-neg66.5%
distribute-rgt-neg-out66.5%
associate-/l*69.2%
fma-define69.4%
distribute-frac-neg69.4%
distribute-neg-frac269.4%
sub-neg69.4%
distribute-neg-in69.4%
remove-double-neg69.4%
+-commutative69.4%
sub-neg69.4%
Simplified69.4%
Taylor expanded in y around 0 73.0%
associate--l+73.0%
div-sub73.0%
Simplified73.0%
Taylor expanded in t around -inf 95.4%
clear-num95.2%
inv-pow95.2%
Applied egg-rr95.2%
unpow-195.2%
associate-/r*98.0%
Simplified98.0%
Final simplification92.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+74) (not (<= t 8.5e+201))) (+ x (/ -1.0 (/ (/ t y) (- a z)))) (+ x (* y (+ (/ -1.0 (/ (- a t) z)) 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+74) || !(t <= 8.5e+201)) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} else {
tmp = x + (y * ((-1.0 / ((a - t) / z)) + 1.0));
}
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 ((t <= (-1.2d+74)) .or. (.not. (t <= 8.5d+201))) then
tmp = x + ((-1.0d0) / ((t / y) / (a - z)))
else
tmp = x + (y * (((-1.0d0) / ((a - t) / z)) + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+74) || !(t <= 8.5e+201)) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} else {
tmp = x + (y * ((-1.0 / ((a - t) / z)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+74) or not (t <= 8.5e+201): tmp = x + (-1.0 / ((t / y) / (a - z))) else: tmp = x + (y * ((-1.0 / ((a - t) / z)) + 1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+74) || !(t <= 8.5e+201)) tmp = Float64(x + Float64(-1.0 / Float64(Float64(t / y) / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(Float64(-1.0 / Float64(Float64(a - t) / z)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+74) || ~((t <= 8.5e+201))) tmp = x + (-1.0 / ((t / y) / (a - z))); else tmp = x + (y * ((-1.0 / ((a - t) / z)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+74], N[Not[LessEqual[t, 8.5e+201]], $MachinePrecision]], N[(x + N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(-1.0 / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+74} \lor \neg \left(t \leq 8.5 \cdot 10^{+201}\right):\\
\;\;\;\;x + \frac{-1}{\frac{\frac{t}{y}}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{-1}{\frac{a - t}{z}} + 1\right)\\
\end{array}
\end{array}
if t < -1.20000000000000004e74 or 8.5e201 < t Initial program 43.2%
sub-neg43.2%
+-commutative43.2%
distribute-frac-neg43.2%
distribute-rgt-neg-out43.2%
associate-/l*51.6%
fma-define52.3%
distribute-frac-neg52.3%
distribute-neg-frac252.3%
sub-neg52.3%
distribute-neg-in52.3%
remove-double-neg52.3%
+-commutative52.3%
sub-neg52.3%
Simplified52.3%
Taylor expanded in y around 0 73.1%
associate--l+73.1%
div-sub73.1%
Simplified73.1%
Taylor expanded in t around -inf 79.8%
clear-num79.7%
inv-pow79.7%
Applied egg-rr79.7%
unpow-179.7%
associate-/r*89.6%
Simplified89.6%
if -1.20000000000000004e74 < t < 8.5e201Initial program 83.9%
sub-neg83.9%
+-commutative83.9%
distribute-frac-neg83.9%
distribute-rgt-neg-out83.9%
associate-/l*91.7%
fma-define91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
sub-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
+-commutative91.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in y around 0 93.3%
associate--l+93.3%
div-sub93.3%
Simplified93.3%
clear-num93.2%
inv-pow93.2%
Applied egg-rr93.2%
unpow-193.2%
Simplified93.2%
Taylor expanded in z around inf 91.5%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.2e-82)
(- (+ x y) (* y (/ z a)))
(if (<= a 5.1e-169)
(+ x (/ -1.0 (/ (/ t y) (- a z))))
(+ x (* y (- 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e-82) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 5.1e-169) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} else {
tmp = x + (y * (1.0 - (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 (a <= (-9.2d-82)) then
tmp = (x + y) - (y * (z / a))
else if (a <= 5.1d-169) then
tmp = x + ((-1.0d0) / ((t / y) / (a - z)))
else
tmp = x + (y * (1.0d0 - (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 (a <= -9.2e-82) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 5.1e-169) {
tmp = x + (-1.0 / ((t / y) / (a - z)));
} else {
tmp = x + (y * (1.0 - (z / a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.2e-82: tmp = (x + y) - (y * (z / a)) elif a <= 5.1e-169: tmp = x + (-1.0 / ((t / y) / (a - z))) else: tmp = x + (y * (1.0 - (z / a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e-82) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (a <= 5.1e-169) tmp = Float64(x + Float64(-1.0 / Float64(Float64(t / y) / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.2e-82) tmp = (x + y) - (y * (z / a)); elseif (a <= 5.1e-169) tmp = x + (-1.0 / ((t / y) / (a - z))); else tmp = x + (y * (1.0 - (z / a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e-82], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e-169], N[(x + N[(-1.0 / N[(N[(t / y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-82}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-169}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{t}{y}}{a - z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < -9.19999999999999988e-82Initial program 76.5%
Taylor expanded in t around 0 76.5%
associate-/l*86.2%
Simplified86.2%
if -9.19999999999999988e-82 < a < 5.09999999999999997e-169Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
distribute-frac-neg65.4%
distribute-rgt-neg-out65.4%
associate-/l*68.8%
fma-define69.0%
distribute-frac-neg69.0%
distribute-neg-frac269.0%
sub-neg69.0%
distribute-neg-in69.0%
remove-double-neg69.0%
+-commutative69.0%
sub-neg69.0%
Simplified69.0%
Taylor expanded in y around 0 76.1%
associate--l+76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in t around -inf 88.9%
clear-num88.8%
inv-pow88.8%
Applied egg-rr88.8%
unpow-188.8%
associate-/r*90.8%
Simplified90.8%
if 5.09999999999999997e-169 < a Initial program 75.2%
sub-neg75.2%
+-commutative75.2%
distribute-frac-neg75.2%
distribute-rgt-neg-out75.2%
associate-/l*83.4%
fma-define83.6%
distribute-frac-neg83.6%
distribute-neg-frac283.6%
sub-neg83.6%
distribute-neg-in83.6%
remove-double-neg83.6%
+-commutative83.6%
sub-neg83.6%
Simplified83.6%
Taylor expanded in y around 0 88.7%
associate--l+88.7%
div-sub88.7%
Simplified88.7%
Taylor expanded in t around 0 80.8%
*-commutative80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-81) (not (<= a 4.5e-169))) (+ x (* y (- 1.0 (/ z a)))) (+ x (/ (* y (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-81) || !(a <= 4.5e-169)) {
tmp = x + (y * (1.0 - (z / a)));
} else {
tmp = x + ((y * (z - a)) / t);
}
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 ((a <= (-6d-81)) .or. (.not. (a <= 4.5d-169))) then
tmp = x + (y * (1.0d0 - (z / a)))
else
tmp = x + ((y * (z - a)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-81) || !(a <= 4.5e-169)) {
tmp = x + (y * (1.0 - (z / a)));
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6e-81) or not (a <= 4.5e-169): tmp = x + (y * (1.0 - (z / a))) else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6e-81) || !(a <= 4.5e-169)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / a)))); else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6e-81) || ~((a <= 4.5e-169))) tmp = x + (y * (1.0 - (z / a))); else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6e-81], N[Not[LessEqual[a, 4.5e-169]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-81} \lor \neg \left(a \leq 4.5 \cdot 10^{-169}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -5.9999999999999998e-81 or 4.4999999999999999e-169 < a Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
distribute-frac-neg75.9%
distribute-rgt-neg-out75.9%
associate-/l*85.3%
fma-define85.5%
distribute-frac-neg85.5%
distribute-neg-frac285.5%
sub-neg85.5%
distribute-neg-in85.5%
remove-double-neg85.5%
+-commutative85.5%
sub-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 92.0%
associate--l+92.0%
div-sub92.0%
Simplified92.0%
Taylor expanded in t around 0 83.4%
*-commutative83.4%
mul-1-neg83.4%
unsub-neg83.4%
Simplified83.4%
if -5.9999999999999998e-81 < a < 4.4999999999999999e-169Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
distribute-frac-neg65.4%
distribute-rgt-neg-out65.4%
associate-/l*68.8%
fma-define69.0%
distribute-frac-neg69.0%
distribute-neg-frac269.0%
sub-neg69.0%
distribute-neg-in69.0%
remove-double-neg69.0%
+-commutative69.0%
sub-neg69.0%
Simplified69.0%
Taylor expanded in y around 0 76.1%
associate--l+76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in t around -inf 88.9%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-81) (not (<= a 4.8e-169))) (+ x (* y (- 1.0 (/ z a)))) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-81) || !(a <= 4.8e-169)) {
tmp = x + (y * (1.0 - (z / a)));
} else {
tmp = x + ((y * z) / t);
}
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 ((a <= (-5.2d-81)) .or. (.not. (a <= 4.8d-169))) then
tmp = x + (y * (1.0d0 - (z / a)))
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-81) || !(a <= 4.8e-169)) {
tmp = x + (y * (1.0 - (z / a)));
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.2e-81) or not (a <= 4.8e-169): tmp = x + (y * (1.0 - (z / a))) else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e-81) || !(a <= 4.8e-169)) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / a)))); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.2e-81) || ~((a <= 4.8e-169))) tmp = x + (y * (1.0 - (z / a))); else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e-81], N[Not[LessEqual[a, 4.8e-169]], $MachinePrecision]], N[(x + N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-81} \lor \neg \left(a \leq 4.8 \cdot 10^{-169}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -5.1999999999999998e-81 or 4.80000000000000021e-169 < a Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
distribute-frac-neg75.9%
distribute-rgt-neg-out75.9%
associate-/l*85.3%
fma-define85.5%
distribute-frac-neg85.5%
distribute-neg-frac285.5%
sub-neg85.5%
distribute-neg-in85.5%
remove-double-neg85.5%
+-commutative85.5%
sub-neg85.5%
Simplified85.5%
Taylor expanded in y around 0 92.0%
associate--l+92.0%
div-sub92.0%
Simplified92.0%
Taylor expanded in t around 0 83.4%
*-commutative83.4%
mul-1-neg83.4%
unsub-neg83.4%
Simplified83.4%
if -5.1999999999999998e-81 < a < 4.80000000000000021e-169Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
distribute-frac-neg65.4%
distribute-rgt-neg-out65.4%
associate-/l*68.8%
fma-define69.0%
distribute-frac-neg69.0%
distribute-neg-frac269.0%
sub-neg69.0%
distribute-neg-in69.0%
remove-double-neg69.0%
+-commutative69.0%
sub-neg69.0%
Simplified69.0%
Taylor expanded in y around 0 76.1%
associate--l+76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in a around 0 84.5%
Final simplification83.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e-81) (- (+ x y) (* y (/ z a))) (if (<= a 3.7e-171) (+ x (/ (* y (- z a)) t)) (+ x (* y (- 1.0 (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-81) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 3.7e-171) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + (y * (1.0 - (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 (a <= (-1.6d-81)) then
tmp = (x + y) - (y * (z / a))
else if (a <= 3.7d-171) then
tmp = x + ((y * (z - a)) / t)
else
tmp = x + (y * (1.0d0 - (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 (a <= -1.6e-81) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 3.7e-171) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + (y * (1.0 - (z / a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-81: tmp = (x + y) - (y * (z / a)) elif a <= 3.7e-171: tmp = x + ((y * (z - a)) / t) else: tmp = x + (y * (1.0 - (z / a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-81) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (a <= 3.7e-171) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(z / a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-81) tmp = (x + y) - (y * (z / a)); elseif (a <= 3.7e-171) tmp = x + ((y * (z - a)) / t); else tmp = x + (y * (1.0 - (z / a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-81], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.7e-171], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-81}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-171}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < -1.6e-81Initial program 76.5%
Taylor expanded in t around 0 76.5%
associate-/l*86.2%
Simplified86.2%
if -1.6e-81 < a < 3.70000000000000012e-171Initial program 65.4%
sub-neg65.4%
+-commutative65.4%
distribute-frac-neg65.4%
distribute-rgt-neg-out65.4%
associate-/l*68.8%
fma-define69.0%
distribute-frac-neg69.0%
distribute-neg-frac269.0%
sub-neg69.0%
distribute-neg-in69.0%
remove-double-neg69.0%
+-commutative69.0%
sub-neg69.0%
Simplified69.0%
Taylor expanded in y around 0 76.1%
associate--l+76.1%
div-sub76.1%
Simplified76.1%
Taylor expanded in t around -inf 88.9%
if 3.70000000000000012e-171 < a Initial program 75.2%
sub-neg75.2%
+-commutative75.2%
distribute-frac-neg75.2%
distribute-rgt-neg-out75.2%
associate-/l*83.4%
fma-define83.6%
distribute-frac-neg83.6%
distribute-neg-frac283.6%
sub-neg83.6%
distribute-neg-in83.6%
remove-double-neg83.6%
+-commutative83.6%
sub-neg83.6%
Simplified83.6%
Taylor expanded in y around 0 88.7%
associate--l+88.7%
div-sub88.7%
Simplified88.7%
Taylor expanded in t around 0 80.8%
*-commutative80.8%
mul-1-neg80.8%
unsub-neg80.8%
Simplified80.8%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e+110) (not (<= a 1.6e+46))) (+ x y) (+ x (/ (* y z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+110) || !(a <= 1.6e+46)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
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 ((a <= (-3d+110)) .or. (.not. (a <= 1.6d+46))) then
tmp = x + y
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+110) || !(a <= 1.6e+46)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e+110) or not (a <= 1.6e+46): tmp = x + y else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e+110) || !(a <= 1.6e+46)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e+110) || ~((a <= 1.6e+46))) tmp = x + y; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e+110], N[Not[LessEqual[a, 1.6e+46]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+110} \lor \neg \left(a \leq 1.6 \cdot 10^{+46}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if a < -3.00000000000000007e110 or 1.5999999999999999e46 < a Initial program 72.3%
sub-neg72.3%
+-commutative72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*90.7%
fma-define91.1%
distribute-frac-neg91.1%
distribute-neg-frac291.1%
sub-neg91.1%
distribute-neg-in91.1%
remove-double-neg91.1%
+-commutative91.1%
sub-neg91.1%
Simplified91.1%
Taylor expanded in a around inf 75.9%
+-commutative75.9%
Simplified75.9%
if -3.00000000000000007e110 < a < 1.5999999999999999e46Initial program 73.9%
sub-neg73.9%
+-commutative73.9%
distribute-frac-neg73.9%
distribute-rgt-neg-out73.9%
associate-/l*74.6%
fma-define74.7%
distribute-frac-neg74.7%
distribute-neg-frac274.7%
sub-neg74.7%
distribute-neg-in74.7%
remove-double-neg74.7%
+-commutative74.7%
sub-neg74.7%
Simplified74.7%
Taylor expanded in y around 0 84.9%
associate--l+84.9%
div-sub84.9%
Simplified84.9%
Taylor expanded in a around 0 70.1%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9e+157) (not (<= z 5.5e+152))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9e+157) || !(z <= 5.5e+152)) {
tmp = y * (z / (t - a));
} 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) :: tmp
if ((z <= (-9d+157)) .or. (.not. (z <= 5.5d+152))) then
tmp = y * (z / (t - a))
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 tmp;
if ((z <= -9e+157) || !(z <= 5.5e+152)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9e+157) or not (z <= 5.5e+152): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9e+157) || !(z <= 5.5e+152)) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9e+157) || ~((z <= 5.5e+152))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9e+157], N[Not[LessEqual[z, 5.5e+152]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+157} \lor \neg \left(z \leq 5.5 \cdot 10^{+152}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.9999999999999997e157 or 5.4999999999999999e152 < z Initial program 74.6%
sub-neg74.6%
+-commutative74.6%
distribute-frac-neg74.6%
distribute-rgt-neg-out74.6%
associate-/l*91.7%
fma-define91.8%
distribute-frac-neg91.8%
distribute-neg-frac291.8%
sub-neg91.8%
distribute-neg-in91.8%
remove-double-neg91.8%
+-commutative91.8%
sub-neg91.8%
Simplified91.8%
Taylor expanded in z around inf 59.8%
associate-/l*73.1%
Simplified73.1%
if -8.9999999999999997e157 < z < 5.4999999999999999e152Initial program 72.8%
sub-neg72.8%
+-commutative72.8%
distribute-frac-neg72.8%
distribute-rgt-neg-out72.8%
associate-/l*78.0%
fma-define78.2%
distribute-frac-neg78.2%
distribute-neg-frac278.2%
sub-neg78.2%
distribute-neg-in78.2%
remove-double-neg78.2%
+-commutative78.2%
sub-neg78.2%
Simplified78.2%
Taylor expanded in a around inf 66.8%
+-commutative66.8%
Simplified66.8%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2e-197) (not (<= a 2.8e-204))) (+ x y) (* z (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2e-197) || !(a <= 2.8e-204)) {
tmp = x + y;
} else {
tmp = z * (y / t);
}
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 ((a <= (-2d-197)) .or. (.not. (a <= 2.8d-204))) then
tmp = x + y
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2e-197) || !(a <= 2.8e-204)) {
tmp = x + y;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2e-197) or not (a <= 2.8e-204): tmp = x + y else: tmp = z * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2e-197) || !(a <= 2.8e-204)) tmp = Float64(x + y); else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2e-197) || ~((a <= 2.8e-204))) tmp = x + y; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2e-197], N[Not[LessEqual[a, 2.8e-204]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-197} \lor \neg \left(a \leq 2.8 \cdot 10^{-204}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -2e-197 or 2.8e-204 < a Initial program 75.5%
sub-neg75.5%
+-commutative75.5%
distribute-frac-neg75.5%
distribute-rgt-neg-out75.5%
associate-/l*84.4%
fma-define84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
sub-neg84.5%
distribute-neg-in84.5%
remove-double-neg84.5%
+-commutative84.5%
sub-neg84.5%
Simplified84.5%
Taylor expanded in a around inf 63.6%
+-commutative63.6%
Simplified63.6%
if -2e-197 < a < 2.8e-204Initial program 60.5%
sub-neg60.5%
+-commutative60.5%
distribute-frac-neg60.5%
distribute-rgt-neg-out60.5%
associate-/l*63.7%
fma-define63.9%
distribute-frac-neg63.9%
distribute-neg-frac263.9%
sub-neg63.9%
distribute-neg-in63.9%
remove-double-neg63.9%
+-commutative63.9%
sub-neg63.9%
Simplified63.9%
Taylor expanded in z around inf 60.5%
Taylor expanded in t around inf 60.0%
*-commutative60.0%
associate-/l*64.9%
Applied egg-rr64.9%
Final simplification63.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-198) (not (<= a 7.5e-204))) (+ x y) (* y (/ z t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-198) || !(a <= 7.5e-204)) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
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 ((a <= (-3d-198)) .or. (.not. (a <= 7.5d-204))) then
tmp = x + y
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-198) || !(a <= 7.5e-204)) {
tmp = x + y;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-198) or not (a <= 7.5e-204): tmp = x + y else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-198) || !(a <= 7.5e-204)) tmp = Float64(x + y); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-198) || ~((a <= 7.5e-204))) tmp = x + y; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-198], N[Not[LessEqual[a, 7.5e-204]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-198} \lor \neg \left(a \leq 7.5 \cdot 10^{-204}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -3.0000000000000001e-198 or 7.5000000000000003e-204 < a Initial program 75.5%
sub-neg75.5%
+-commutative75.5%
distribute-frac-neg75.5%
distribute-rgt-neg-out75.5%
associate-/l*84.4%
fma-define84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
sub-neg84.5%
distribute-neg-in84.5%
remove-double-neg84.5%
+-commutative84.5%
sub-neg84.5%
Simplified84.5%
Taylor expanded in a around inf 63.6%
+-commutative63.6%
Simplified63.6%
if -3.0000000000000001e-198 < a < 7.5000000000000003e-204Initial program 60.5%
sub-neg60.5%
+-commutative60.5%
distribute-frac-neg60.5%
distribute-rgt-neg-out60.5%
associate-/l*63.7%
fma-define63.9%
distribute-frac-neg63.9%
distribute-neg-frac263.9%
sub-neg63.9%
distribute-neg-in63.9%
remove-double-neg63.9%
+-commutative63.9%
sub-neg63.9%
Simplified63.9%
Taylor expanded in z around inf 60.5%
Taylor expanded in t around inf 60.0%
associate-/l*60.5%
Simplified60.5%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.05e-81) x (if (<= x 6.5e-171) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.05e-81) {
tmp = x;
} else if (x <= 6.5e-171) {
tmp = y;
} else {
tmp = x;
}
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 <= (-3.05d-81)) then
tmp = x
else if (x <= 6.5d-171) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.05e-81) {
tmp = x;
} else if (x <= 6.5e-171) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.05e-81: tmp = x elif x <= 6.5e-171: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.05e-81) tmp = x; elseif (x <= 6.5e-171) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.05e-81) tmp = x; elseif (x <= 6.5e-171) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.05e-81], x, If[LessEqual[x, 6.5e-171], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.05 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-171}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.0500000000000001e-81 or 6.5000000000000004e-171 < x Initial program 78.5%
sub-neg78.5%
+-commutative78.5%
distribute-frac-neg78.5%
distribute-rgt-neg-out78.5%
associate-/l*86.2%
fma-define86.6%
distribute-frac-neg86.6%
distribute-neg-frac286.6%
sub-neg86.6%
distribute-neg-in86.6%
remove-double-neg86.6%
+-commutative86.6%
sub-neg86.6%
Simplified86.6%
Taylor expanded in t around inf 60.1%
distribute-rgt1-in60.1%
metadata-eval60.1%
mul0-lft60.1%
Simplified60.1%
Taylor expanded in x around 0 60.1%
if -3.0500000000000001e-81 < x < 6.5000000000000004e-171Initial program 62.0%
sub-neg62.0%
+-commutative62.0%
distribute-frac-neg62.0%
distribute-rgt-neg-out62.0%
associate-/l*70.7%
fma-define70.4%
distribute-frac-neg70.4%
distribute-neg-frac270.4%
sub-neg70.4%
distribute-neg-in70.4%
remove-double-neg70.4%
+-commutative70.4%
sub-neg70.4%
Simplified70.4%
Taylor expanded in a around inf 40.8%
+-commutative40.8%
Simplified40.8%
Taylor expanded in y around inf 34.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.08e+74) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.08e+74) {
tmp = x;
} 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) :: tmp
if (t <= (-1.08d+74)) then
tmp = x
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 tmp;
if (t <= -1.08e+74) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.08e+74: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.08e+74) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.08e+74) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.08e+74], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.08 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.08e74Initial program 43.6%
sub-neg43.6%
+-commutative43.6%
distribute-frac-neg43.6%
distribute-rgt-neg-out43.6%
associate-/l*55.5%
fma-define55.6%
distribute-frac-neg55.6%
distribute-neg-frac255.6%
sub-neg55.6%
distribute-neg-in55.6%
remove-double-neg55.6%
+-commutative55.6%
sub-neg55.6%
Simplified55.6%
Taylor expanded in t around inf 63.0%
distribute-rgt1-in63.0%
metadata-eval63.0%
mul0-lft63.0%
Simplified63.0%
Taylor expanded in x around 0 63.0%
if -1.08e74 < t Initial program 80.3%
sub-neg80.3%
+-commutative80.3%
distribute-frac-neg80.3%
distribute-rgt-neg-out80.3%
associate-/l*87.3%
fma-define87.5%
distribute-frac-neg87.5%
distribute-neg-frac287.5%
sub-neg87.5%
distribute-neg-in87.5%
remove-double-neg87.5%
+-commutative87.5%
sub-neg87.5%
Simplified87.5%
Taylor expanded in a around inf 59.9%
+-commutative59.9%
Simplified59.9%
Final simplification60.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 73.2%
sub-neg73.2%
+-commutative73.2%
distribute-frac-neg73.2%
distribute-rgt-neg-out73.2%
associate-/l*81.2%
fma-define81.4%
distribute-frac-neg81.4%
distribute-neg-frac281.4%
sub-neg81.4%
distribute-neg-in81.4%
remove-double-neg81.4%
+-commutative81.4%
sub-neg81.4%
Simplified81.4%
Taylor expanded in t around inf 46.8%
distribute-rgt1-in46.8%
metadata-eval46.8%
mul0-lft46.8%
Simplified46.8%
Taylor expanded in x around 0 46.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024146
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))