
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (- a z))) (t_2 (/ (* (- y z) t) (- a z))))
(if (<= t_2 (- INFINITY))
(fma (- y z) t_1 x)
(if (<= t_2 1e+307)
(- x (/ (* t (- z y)) (- a z)))
(+ x (* (- y z) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a - z);
double t_2 = ((y - z) * t) / (a - z);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma((y - z), t_1, x);
} else if (t_2 <= 1e+307) {
tmp = x - ((t * (z - y)) / (a - z));
} else {
tmp = x + ((y - z) * t_1);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a - z)) t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = fma(Float64(y - z), t_1, x); elseif (t_2 <= 1e+307) tmp = Float64(x - Float64(Float64(t * Float64(z - y)) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - z) * t_1)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(x - N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{a - z}\\
t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;x - \frac{t \cdot \left(z - y\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 42.3%
+-commutative42.3%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306Initial program 99.9%
if 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 37.4%
associate-/l*99.8%
Simplified99.8%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+307)))
(+ x (* (- y z) (/ t (- a z))))
(- x (/ (* t (- z y)) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+307)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x - ((t * (z - y)) / (a - z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - z) * t) / (a - z);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+307)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = x - ((t * (z - y)) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) * t) / (a - z) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+307): tmp = x + ((y - z) * (t / (a - z))) else: tmp = x - ((t * (z - y)) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+307)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = Float64(x - Float64(Float64(t * Float64(z - y)) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - z) * t) / (a - z); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+307))) tmp = x + ((y - z) * (t / (a - z))); else tmp = x - ((t * (z - y)) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+307]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+307}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot \left(z - y\right)}{a - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 40.0%
associate-/l*99.8%
Simplified99.8%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999986e306Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -5.6e+85)
(and (not (<= y 2e-6)) (or (<= y 1.48e+66) (not (<= y 1.9e+130)))))
(* t (/ y (- a z)))
(+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130)))) {
tmp = t * (y / (a - z));
} else {
tmp = t + 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 ((y <= (-5.6d+85)) .or. (.not. (y <= 2d-6)) .and. (y <= 1.48d+66) .or. (.not. (y <= 1.9d+130))) then
tmp = t * (y / (a - z))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130)))) {
tmp = t * (y / (a - z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.6e+85) or (not (y <= 2e-6) and ((y <= 1.48e+66) or not (y <= 1.9e+130))): tmp = t * (y / (a - z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.6e+85) || (!(y <= 2e-6) && ((y <= 1.48e+66) || !(y <= 1.9e+130)))) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.6e+85) || (~((y <= 2e-6)) && ((y <= 1.48e+66) || ~((y <= 1.9e+130))))) tmp = t * (y / (a - z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.6e+85], And[N[Not[LessEqual[y, 2e-6]], $MachinePrecision], Or[LessEqual[y, 1.48e+66], N[Not[LessEqual[y, 1.9e+130]], $MachinePrecision]]]], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+85} \lor \neg \left(y \leq 2 \cdot 10^{-6}\right) \land \left(y \leq 1.48 \cdot 10^{+66} \lor \neg \left(y \leq 1.9 \cdot 10^{+130}\right)\right):\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if y < -5.5999999999999998e85 or 1.99999999999999991e-6 < y < 1.47999999999999998e66 or 1.9000000000000001e130 < y Initial program 80.3%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in x around inf 70.6%
+-commutative70.6%
associate-/l*70.7%
fma-define70.7%
*-commutative70.7%
associate-/r*73.7%
Simplified73.7%
Taylor expanded in y around inf 57.9%
associate-/l*58.9%
Simplified58.9%
if -5.5999999999999998e85 < y < 1.99999999999999991e-6 or 1.47999999999999998e66 < y < 1.9000000000000001e130Initial program 88.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 73.9%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))))
(if (<= y -9.8e+94)
t_1
(if (<= y 2e-6)
(+ t x)
(if (<= y 1.12e+66)
(* t (/ y (- a z)))
(if (<= y 1.85e+130) (+ t x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -9.8e+94) {
tmp = t_1;
} else if (y <= 2e-6) {
tmp = t + x;
} else if (y <= 1.12e+66) {
tmp = t * (y / (a - z));
} else if (y <= 1.85e+130) {
tmp = t + x;
} 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) :: tmp
t_1 = y * (t / (a - z))
if (y <= (-9.8d+94)) then
tmp = t_1
else if (y <= 2d-6) then
tmp = t + x
else if (y <= 1.12d+66) then
tmp = t * (y / (a - z))
else if (y <= 1.85d+130) then
tmp = t + x
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 * (t / (a - z));
double tmp;
if (y <= -9.8e+94) {
tmp = t_1;
} else if (y <= 2e-6) {
tmp = t + x;
} else if (y <= 1.12e+66) {
tmp = t * (y / (a - z));
} else if (y <= 1.85e+130) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if y <= -9.8e+94: tmp = t_1 elif y <= 2e-6: tmp = t + x elif y <= 1.12e+66: tmp = t * (y / (a - z)) elif y <= 1.85e+130: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (y <= -9.8e+94) tmp = t_1; elseif (y <= 2e-6) tmp = Float64(t + x); elseif (y <= 1.12e+66) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (y <= 1.85e+130) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (y <= -9.8e+94) tmp = t_1; elseif (y <= 2e-6) tmp = t + x; elseif (y <= 1.12e+66) tmp = t * (y / (a - z)); elseif (y <= 1.85e+130) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.8e+94], t$95$1, If[LessEqual[y, 2e-6], N[(t + x), $MachinePrecision], If[LessEqual[y, 1.12e+66], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+130], N[(t + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -9.8 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-6}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+130}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.7999999999999998e94 or 1.8500000000000001e130 < y Initial program 78.9%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in y around inf 75.6%
associate-*l/87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y around inf 86.6%
Taylor expanded in y around inf 57.9%
associate-*l/64.0%
*-commutative64.0%
Simplified64.0%
if -9.7999999999999998e94 < y < 1.99999999999999991e-6 or 1.12e66 < y < 1.8500000000000001e130Initial program 88.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 73.9%
if 1.99999999999999991e-6 < y < 1.12e66Initial program 88.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 81.9%
+-commutative81.9%
associate-/l*76.2%
fma-define76.2%
*-commutative76.2%
associate-/r*76.2%
Simplified76.2%
Taylor expanded in y around inf 58.3%
associate-/l*58.4%
Simplified58.4%
Final simplification69.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -35.0)
(+ t x)
(if (<= z 3.2e-110)
t_1
(if (<= z 1e-33)
(* y (/ t (- a z)))
(if (<= z 1.35e+25) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -35.0) {
tmp = t + x;
} else if (z <= 3.2e-110) {
tmp = t_1;
} else if (z <= 1e-33) {
tmp = y * (t / (a - z));
} else if (z <= 1.35e+25) {
tmp = t_1;
} else {
tmp = t + 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) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (z <= (-35.0d0)) then
tmp = t + x
else if (z <= 3.2d-110) then
tmp = t_1
else if (z <= 1d-33) then
tmp = y * (t / (a - z))
else if (z <= 1.35d+25) then
tmp = t_1
else
tmp = t + x
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 * (y / a));
double tmp;
if (z <= -35.0) {
tmp = t + x;
} else if (z <= 3.2e-110) {
tmp = t_1;
} else if (z <= 1e-33) {
tmp = y * (t / (a - z));
} else if (z <= 1.35e+25) {
tmp = t_1;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -35.0: tmp = t + x elif z <= 3.2e-110: tmp = t_1 elif z <= 1e-33: tmp = y * (t / (a - z)) elif z <= 1.35e+25: tmp = t_1 else: tmp = t + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -35.0) tmp = Float64(t + x); elseif (z <= 3.2e-110) tmp = t_1; elseif (z <= 1e-33) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (z <= 1.35e+25) tmp = t_1; else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (z <= -35.0) tmp = t + x; elseif (z <= 3.2e-110) tmp = t_1; elseif (z <= 1e-33) tmp = y * (t / (a - z)); elseif (z <= 1.35e+25) tmp = t_1; else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -35.0], N[(t + x), $MachinePrecision], If[LessEqual[z, 3.2e-110], t$95$1, If[LessEqual[z, 1e-33], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+25], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -35:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-33}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -35 or 1.35e25 < z Initial program 75.0%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in z around inf 73.9%
if -35 < z < 3.20000000000000028e-110 or 1.0000000000000001e-33 < z < 1.35e25Initial program 96.4%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around inf 90.7%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in y around inf 86.0%
Taylor expanded in a around inf 75.1%
associate-/l*74.3%
Simplified74.3%
if 3.20000000000000028e-110 < z < 1.0000000000000001e-33Initial program 94.6%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in y around inf 77.8%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in y around inf 83.7%
Taylor expanded in y around inf 60.9%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Final simplification73.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.6e+171)
(+ t x)
(if (<= z -3.1e-20)
(- x (* t (/ y z)))
(if (<= z 8.8e-69)
(+ x (* y (/ t a)))
(if (<= z 2.7e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+171) {
tmp = t + x;
} else if (z <= -3.1e-20) {
tmp = x - (t * (y / z));
} else if (z <= 8.8e-69) {
tmp = x + (y * (t / a));
} else if (z <= 2.7e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + 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 (z <= (-3.6d+171)) then
tmp = t + x
else if (z <= (-3.1d-20)) then
tmp = x - (t * (y / z))
else if (z <= 8.8d-69) then
tmp = x + (y * (t / a))
else if (z <= 2.7d+120) then
tmp = x - ((y * t) / z)
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+171) {
tmp = t + x;
} else if (z <= -3.1e-20) {
tmp = x - (t * (y / z));
} else if (z <= 8.8e-69) {
tmp = x + (y * (t / a));
} else if (z <= 2.7e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+171: tmp = t + x elif z <= -3.1e-20: tmp = x - (t * (y / z)) elif z <= 8.8e-69: tmp = x + (y * (t / a)) elif z <= 2.7e+120: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+171) tmp = Float64(t + x); elseif (z <= -3.1e-20) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 8.8e-69) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.7e+120) tmp = Float64(x - Float64(Float64(y * t) / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e+171) tmp = t + x; elseif (z <= -3.1e-20) tmp = x - (t * (y / z)); elseif (z <= 8.8e-69) tmp = x + (y * (t / a)); elseif (z <= 2.7e+120) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+171], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.1e-20], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-69], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+120], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+171}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-20}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-69}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -3.60000000000000018e171 or 2.7e120 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -3.60000000000000018e171 < z < -3.1e-20Initial program 88.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in a around 0 73.3%
mul-1-neg73.3%
unsub-neg73.3%
associate-/l*75.4%
Simplified75.4%
if -3.1e-20 < z < 8.8000000000000001e-69Initial program 96.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in y around inf 90.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in a around inf 77.4%
if 8.8000000000000001e-69 < z < 2.7e120Initial program 94.9%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in y around inf 76.8%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in a around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in t around 0 71.7%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.9e+168)
(+ t x)
(if (<= z -5.2e-19)
(- x (* y (/ t z)))
(if (<= z 4e-68)
(+ x (* y (/ t a)))
(if (<= z 4.5e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+168) {
tmp = t + x;
} else if (z <= -5.2e-19) {
tmp = x - (y * (t / z));
} else if (z <= 4e-68) {
tmp = x + (y * (t / a));
} else if (z <= 4.5e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + 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 (z <= (-2.9d+168)) then
tmp = t + x
else if (z <= (-5.2d-19)) then
tmp = x - (y * (t / z))
else if (z <= 4d-68) then
tmp = x + (y * (t / a))
else if (z <= 4.5d+120) then
tmp = x - ((y * t) / z)
else
tmp = t + x
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.9e+168) {
tmp = t + x;
} else if (z <= -5.2e-19) {
tmp = x - (y * (t / z));
} else if (z <= 4e-68) {
tmp = x + (y * (t / a));
} else if (z <= 4.5e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+168: tmp = t + x elif z <= -5.2e-19: tmp = x - (y * (t / z)) elif z <= 4e-68: tmp = x + (y * (t / a)) elif z <= 4.5e+120: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+168) tmp = Float64(t + x); elseif (z <= -5.2e-19) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 4e-68) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 4.5e+120) tmp = Float64(x - Float64(Float64(y * t) / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+168) tmp = t + x; elseif (z <= -5.2e-19) tmp = x - (y * (t / z)); elseif (z <= 4e-68) tmp = x + (y * (t / a)); elseif (z <= 4.5e+120) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -5.2e-19], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+120], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-19}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -2.9e168 or 4.49999999999999977e120 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -2.9e168 < z < -5.20000000000000026e-19Initial program 88.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in a around 0 77.5%
associate-*r/77.5%
neg-mul-177.5%
Simplified77.5%
if -5.20000000000000026e-19 < z < 4.00000000000000027e-68Initial program 96.2%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in y around inf 90.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in a around inf 77.4%
if 4.00000000000000027e-68 < z < 4.49999999999999977e120Initial program 94.9%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in y around inf 76.8%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in a around 0 71.7%
mul-1-neg71.7%
unsub-neg71.7%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in t around 0 71.7%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+169)
(+ t x)
(if (<= z -2.1e-19)
(- x (* t (/ y z)))
(if (<= z 3.6e+25) (+ x (* y (/ t a))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+169) {
tmp = t + x;
} else if (z <= -2.1e-19) {
tmp = x - (t * (y / z));
} else if (z <= 3.6e+25) {
tmp = x + (y * (t / a));
} else {
tmp = t + 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 (z <= (-6d+169)) then
tmp = t + x
else if (z <= (-2.1d-19)) then
tmp = x - (t * (y / z))
else if (z <= 3.6d+25) then
tmp = x + (y * (t / a))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+169) {
tmp = t + x;
} else if (z <= -2.1e-19) {
tmp = x - (t * (y / z));
} else if (z <= 3.6e+25) {
tmp = x + (y * (t / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+169: tmp = t + x elif z <= -2.1e-19: tmp = x - (t * (y / z)) elif z <= 3.6e+25: tmp = x + (y * (t / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+169) tmp = Float64(t + x); elseif (z <= -2.1e-19) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 3.6e+25) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+169) tmp = t + x; elseif (z <= -2.1e-19) tmp = x - (t * (y / z)); elseif (z <= 3.6e+25) tmp = x + (y * (t / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+169], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.1e-19], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+25], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+169}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-19}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -5.9999999999999999e169 or 3.60000000000000015e25 < z Initial program 69.7%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in z around inf 78.6%
if -5.9999999999999999e169 < z < -2.0999999999999999e-19Initial program 88.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 77.7%
associate-*l/81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in a around 0 73.3%
mul-1-neg73.3%
unsub-neg73.3%
associate-/l*75.4%
Simplified75.4%
if -2.0999999999999999e-19 < z < 3.60000000000000015e25Initial program 96.0%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around inf 89.4%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in a around inf 74.5%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e+168) (not (<= z 5.4e+121))) (+ t x) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e+168) || !(z <= 5.4e+121)) {
tmp = t + x;
} else {
tmp = x + (y * (t / (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 ((z <= (-1.55d+168)) .or. (.not. (z <= 5.4d+121))) then
tmp = t + x
else
tmp = x + (y * (t / (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 ((z <= -1.55e+168) || !(z <= 5.4e+121)) {
tmp = t + x;
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e+168) or not (z <= 5.4e+121): tmp = t + x else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e+168) || !(z <= 5.4e+121)) tmp = Float64(t + x); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.55e+168) || ~((z <= 5.4e+121))) tmp = t + x; else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+168], N[Not[LessEqual[z, 5.4e+121]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+168} \lor \neg \left(z \leq 5.4 \cdot 10^{+121}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -1.54999999999999998e168 or 5.4000000000000004e121 < z Initial program 63.3%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 84.6%
if -1.54999999999999998e168 < z < 5.4000000000000004e121Initial program 94.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around inf 84.5%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -54.0) (not (<= z 2.9e+21))) (+ x (- t (* t (/ y z)))) (+ x (* y (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -54.0) || !(z <= 2.9e+21)) {
tmp = x + (t - (t * (y / z)));
} else {
tmp = x + (y * (t / (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 ((z <= (-54.0d0)) .or. (.not. (z <= 2.9d+21))) then
tmp = x + (t - (t * (y / z)))
else
tmp = x + (y * (t / (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 ((z <= -54.0) || !(z <= 2.9e+21)) {
tmp = x + (t - (t * (y / z)));
} else {
tmp = x + (y * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -54.0) or not (z <= 2.9e+21): tmp = x + (t - (t * (y / z))) else: tmp = x + (y * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -54.0) || !(z <= 2.9e+21)) tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); else tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -54.0) || ~((z <= 2.9e+21))) tmp = x + (t - (t * (y / z))); else tmp = x + (y * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -54.0], N[Not[LessEqual[z, 2.9e+21]], $MachinePrecision]], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -54 \lor \neg \left(z \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if z < -54 or 2.9e21 < z Initial program 74.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in a around 0 87.0%
associate-*r/65.7%
neg-mul-165.7%
Simplified87.0%
Taylor expanded in y around 0 81.0%
associate-*l/90.0%
associate-/r/90.8%
neg-mul-190.8%
unsub-neg90.8%
associate-/r/90.0%
associate-*l/81.0%
associate-*r/90.8%
Simplified90.8%
if -54 < z < 2.9e21Initial program 96.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around inf 89.5%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -205.0) (+ x (* t (/ (- z y) z))) (if (<= z 2.6e+21) (+ x (* y (/ t (- a z)))) (+ x (- t (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -205.0) {
tmp = x + (t * ((z - y) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t - (t * (y / 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 <= (-205.0d0)) then
tmp = x + (t * ((z - y) / z))
else if (z <= 2.6d+21) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (t - (t * (y / 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 <= -205.0) {
tmp = x + (t * ((z - y) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t - (t * (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -205.0: tmp = x + (t * ((z - y) / z)) elif z <= 2.6e+21: tmp = x + (y * (t / (a - z))) else: tmp = x + (t - (t * (y / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -205.0) tmp = Float64(x + Float64(t * Float64(Float64(z - y) / z))); elseif (z <= 2.6e+21) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -205.0) tmp = x + (t * ((z - y) / z)); elseif (z <= 2.6e+21) tmp = x + (y * (t / (a - z))); else tmp = x + (t - (t * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -205.0], N[(x + N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+21], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -205:\\
\;\;\;\;x + t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -205Initial program 76.9%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in a around 0 71.5%
mul-1-neg71.5%
unsub-neg71.5%
associate-/l*91.4%
Simplified91.4%
if -205 < z < 2.6e21Initial program 96.9%
associate-/l*96.8%
Simplified96.8%
Taylor expanded in y around inf 89.5%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
if 2.6e21 < z Initial program 72.0%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in a around 0 86.7%
associate-*r/62.6%
neg-mul-162.6%
Simplified86.7%
Taylor expanded in y around 0 80.2%
associate-*l/88.3%
associate-/r/89.9%
neg-mul-189.9%
unsub-neg89.9%
associate-/r/88.3%
associate-*l/80.2%
associate-*r/89.9%
Simplified89.9%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -215.0) (not (<= z 2.9e+25))) (+ t x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -215.0) || !(z <= 2.9e+25)) {
tmp = t + x;
} 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 <= (-215.0d0)) .or. (.not. (z <= 2.9d+25))) then
tmp = t + x
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 <= -215.0) || !(z <= 2.9e+25)) {
tmp = t + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -215.0) or not (z <= 2.9e+25): tmp = t + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -215.0) || !(z <= 2.9e+25)) tmp = Float64(t + x); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -215.0) || ~((z <= 2.9e+25))) tmp = t + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -215.0], N[Not[LessEqual[z, 2.9e+25]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -215 \lor \neg \left(z \leq 2.9 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -215 or 2.8999999999999999e25 < z Initial program 75.0%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in z around inf 73.9%
if -215 < z < 2.8999999999999999e25Initial program 96.1%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in y around inf 89.0%
associate-*l/90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in a around inf 73.7%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.9e+201) (* y (/ t (- z))) (if (<= y 1e+229) (+ t x) (* (/ y z) (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.9e+201) {
tmp = y * (t / -z);
} else if (y <= 1e+229) {
tmp = t + x;
} 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 (y <= (-1.9d+201)) then
tmp = y * (t / -z)
else if (y <= 1d+229) then
tmp = t + x
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 (y <= -1.9e+201) {
tmp = y * (t / -z);
} else if (y <= 1e+229) {
tmp = t + x;
} else {
tmp = (y / z) * -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.9e+201: tmp = y * (t / -z) elif y <= 1e+229: tmp = t + x else: tmp = (y / z) * -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.9e+201) tmp = Float64(y * Float64(t / Float64(-z))); elseif (y <= 1e+229) tmp = Float64(t + x); else tmp = Float64(Float64(y / z) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.9e+201) tmp = y * (t / -z); elseif (y <= 1e+229) tmp = t + x; else tmp = (y / z) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.9e+201], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+229], N[(t + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+201}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;y \leq 10^{+229}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\end{array}
\end{array}
if y < -1.89999999999999998e201Initial program 82.7%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in y around inf 76.1%
associate-*l/80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in a around 0 65.5%
mul-1-neg65.5%
unsub-neg65.5%
associate-/l*55.5%
Simplified55.5%
Taylor expanded in x around 0 53.2%
associate-*l/50.0%
associate-/r/45.5%
associate-*r/45.5%
neg-mul-145.5%
Simplified45.5%
distribute-frac-neg45.5%
associate-/r/50.0%
distribute-rgt-neg-in50.0%
Applied egg-rr50.0%
if -1.89999999999999998e201 < y < 9.9999999999999999e228Initial program 86.6%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around inf 63.4%
if 9.9999999999999999e228 < y Initial program 74.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y around inf 74.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in a around 0 51.0%
mul-1-neg51.0%
unsub-neg51.0%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in x around 0 42.4%
associate-*l/46.8%
associate-/r/46.8%
associate-*r/46.8%
neg-mul-146.8%
Simplified46.8%
Taylor expanded in t around 0 42.4%
associate-*r/47.0%
neg-mul-147.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
Final simplification60.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -29.5) (not (<= z 1.45e-72))) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -29.5) || !(z <= 1.45e-72)) {
tmp = t + x;
} 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 ((z <= (-29.5d0)) .or. (.not. (z <= 1.45d-72))) then
tmp = t + x
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 ((z <= -29.5) || !(z <= 1.45e-72)) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -29.5) or not (z <= 1.45e-72): tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -29.5) || !(z <= 1.45e-72)) tmp = Float64(t + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -29.5) || ~((z <= 1.45e-72))) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -29.5], N[Not[LessEqual[z, 1.45e-72]], $MachinePrecision]], N[(t + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -29.5 \lor \neg \left(z \leq 1.45 \cdot 10^{-72}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -29.5 or 1.44999999999999999e-72 < z Initial program 77.6%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in z around inf 69.7%
if -29.5 < z < 1.44999999999999999e-72Initial program 96.3%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in x around inf 48.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.2e+229) (+ t x) (* (/ y z) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.2e+229) {
tmp = t + x;
} 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 (y <= 1.2d+229) then
tmp = t + x
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 (y <= 1.2e+229) {
tmp = t + x;
} else {
tmp = (y / z) * -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.2e+229: tmp = t + x else: tmp = (y / z) * -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.2e+229) tmp = Float64(t + x); else tmp = Float64(Float64(y / z) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.2e+229) tmp = t + x; else tmp = (y / z) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.2e+229], N[(t + x), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+229}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\end{array}
\end{array}
if y < 1.2e229Initial program 86.2%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in z around inf 59.6%
if 1.2e229 < y Initial program 74.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y around inf 74.4%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in a around 0 51.0%
mul-1-neg51.0%
unsub-neg51.0%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in x around 0 42.4%
associate-*l/46.8%
associate-/r/46.8%
associate-*r/46.8%
neg-mul-146.8%
Simplified46.8%
Taylor expanded in t around 0 42.4%
associate-*r/47.0%
neg-mul-147.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ t (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
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 / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * (t / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * (t / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * (t / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Initial program 85.1%
associate-/l*96.0%
Simplified96.0%
Final simplification96.0%
(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 85.1%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in x around inf 47.9%
Final simplification47.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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) :: tmp
t_1 = x + (((y - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:alt
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))