
(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 (/ (- y z) (- a z))) (t_2 (/ (* (- y z) t) (- a z))))
(if (<= t_2 -5e+214)
(fma t_1 t x)
(if (<= t_2 1e+307) (+ t_2 x) (+ x (* t t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double t_2 = ((y - z) * t) / (a - z);
double tmp;
if (t_2 <= -5e+214) {
tmp = fma(t_1, t, x);
} else if (t_2 <= 1e+307) {
tmp = t_2 + x;
} else {
tmp = x + (t * t_1);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(a - z)) t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z)) tmp = 0.0 if (t_2 <= -5e+214) tmp = fma(t_1, t, x); elseif (t_2 <= 1e+307) tmp = Float64(t_2 + x); else tmp = Float64(x + Float64(t * t_1)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / 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, -5e+214], N[(t$95$1 * t + x), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[(t$95$2 + x), $MachinePrecision], N[(x + N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+214}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, t, x\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2 + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -4.99999999999999953e214Initial program 47.0%
+-commutative47.0%
associate-*l/99.8%
fma-def99.8%
Simplified99.8%
if -4.99999999999999953e214 < (/.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.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (or (<= t_1 -5e+214) (not (<= t_1 1e+307)))
(+ x (* t (/ (- y z) (- a z))))
(+ t_1 x))))
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 <= -5e+214) || !(t_1 <= 1e+307)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1 + 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 = ((y - z) * t) / (a - z)
if ((t_1 <= (-5d+214)) .or. (.not. (t_1 <= 1d+307))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t_1 + x
end if
code = tmp
end function
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 <= -5e+214) || !(t_1 <= 1e+307)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - z) * t) / (a - z) tmp = 0 if (t_1 <= -5e+214) or not (t_1 <= 1e+307): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 + x 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 <= -5e+214) || !(t_1 <= 1e+307)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t_1 + x); 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 <= -5e+214) || ~((t_1 <= 1e+307))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1 + x; 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, -5e+214], N[Not[LessEqual[t$95$1, 1e+307]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+214} \lor \neg \left(t\_1 \leq 10^{+307}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -4.99999999999999953e214 or 9.99999999999999986e306 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 42.7%
associate-*l/99.8%
Simplified99.8%
if -4.99999999999999953e214 < (/.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
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- y z) (/ (- a z) t)))
(if (<= t_1 1e+307) (+ t_1 x) (+ x (* t (/ (- y z) (- 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)) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (t_1 <= 1e+307) {
tmp = t_1 + x;
} else {
tmp = x + (t * ((y - z) / (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) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (t_1 <= 1e+307) {
tmp = t_1 + x;
} else {
tmp = x + (t * ((y - z) / (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: tmp = x + ((y - z) / ((a - z) / t)) elif t_1 <= 1e+307: tmp = t_1 + x else: tmp = x + (t * ((y - z) / (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)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); elseif (t_1 <= 1e+307) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / 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) tmp = x + ((y - z) / ((a - z) / t)); elseif (t_1 <= 1e+307) tmp = t_1 + x; else tmp = x + (t * ((y - z) / (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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $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:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 42.3%
associate-/l*99.8%
Simplified99.8%
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.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -9.6e+171)
(+ t x)
(if (<= z -5e-21)
t_1
(if (<= z 2.4e-64)
(+ x (* y (/ t a)))
(if (<= z 3.3e+121) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t / (z / y));
double tmp;
if (z <= -9.6e+171) {
tmp = t + x;
} else if (z <= -5e-21) {
tmp = t_1;
} else if (z <= 2.4e-64) {
tmp = x + (y * (t / a));
} else if (z <= 3.3e+121) {
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 / (z / y))
if (z <= (-9.6d+171)) then
tmp = t + x
else if (z <= (-5d-21)) then
tmp = t_1
else if (z <= 2.4d-64) then
tmp = x + (y * (t / a))
else if (z <= 3.3d+121) 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 / (z / y));
double tmp;
if (z <= -9.6e+171) {
tmp = t + x;
} else if (z <= -5e-21) {
tmp = t_1;
} else if (z <= 2.4e-64) {
tmp = x + (y * (t / a));
} else if (z <= 3.3e+121) {
tmp = t_1;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t / (z / y)) tmp = 0 if z <= -9.6e+171: tmp = t + x elif z <= -5e-21: tmp = t_1 elif z <= 2.4e-64: tmp = x + (y * (t / a)) elif z <= 3.3e+121: tmp = t_1 else: tmp = t + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t / Float64(z / y))) tmp = 0.0 if (z <= -9.6e+171) tmp = Float64(t + x); elseif (z <= -5e-21) tmp = t_1; elseif (z <= 2.4e-64) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.3e+121) 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 / (z / y)); tmp = 0.0; if (z <= -9.6e+171) tmp = t + x; elseif (z <= -5e-21) tmp = t_1; elseif (z <= 2.4e-64) tmp = x + (y * (t / a)); elseif (z <= 3.3e+121) 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[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.6e+171], N[(t + x), $MachinePrecision], If[LessEqual[z, -5e-21], t$95$1, If[LessEqual[z, 2.4e-64], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+121], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+171}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-64}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -9.5999999999999999e171 or 3.29999999999999979e121 < z Initial program 63.3%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.6%
if -9.5999999999999999e171 < z < -4.99999999999999973e-21 or 2.39999999999999998e-64 < z < 3.29999999999999979e121Initial program 91.7%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in a around 0 79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in z around 0 73.3%
if -4.99999999999999973e-21 < z < 2.39999999999999998e-64Initial program 96.2%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in y around inf 90.3%
*-commutative90.3%
associate-*r/92.1%
Simplified92.1%
Taylor expanded in a around inf 73.9%
+-commutative73.9%
associate-/l*72.9%
associate-/r/77.4%
Simplified77.4%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.7e+172)
(+ t x)
(if (<= z -3.2e-18)
(- x (/ t (/ z y)))
(if (<= z 1.05e-68)
(+ x (* y (/ t a)))
(if (<= z 1.25e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e+172) {
tmp = t + x;
} else if (z <= -3.2e-18) {
tmp = x - (t / (z / y));
} else if (z <= 1.05e-68) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+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.7d+172)) then
tmp = t + x
else if (z <= (-3.2d-18)) then
tmp = x - (t / (z / y))
else if (z <= 1.05d-68) then
tmp = x + (y * (t / a))
else if (z <= 1.25d+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.7e+172) {
tmp = t + x;
} else if (z <= -3.2e-18) {
tmp = x - (t / (z / y));
} else if (z <= 1.05e-68) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.7e+172: tmp = t + x elif z <= -3.2e-18: tmp = x - (t / (z / y)) elif z <= 1.05e-68: tmp = x + (y * (t / a)) elif z <= 1.25e+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.7e+172) tmp = Float64(t + x); elseif (z <= -3.2e-18) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 1.05e-68) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.25e+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.7e+172) tmp = t + x; elseif (z <= -3.2e-18) tmp = x - (t / (z / y)); elseif (z <= 1.05e-68) tmp = x + (y * (t / a)); elseif (z <= 1.25e+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.7e+172], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.2e-18], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+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.7 \cdot 10^{+172}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -2.7e172 or 1.25000000000000005e120 < z Initial program 63.3%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.6%
if -2.7e172 < z < -3.1999999999999999e-18Initial program 88.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in a around 0 75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in z around 0 77.0%
if -3.1999999999999999e-18 < z < 1.05000000000000004e-68Initial program 96.2%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in y around inf 90.3%
*-commutative90.3%
associate-*r/92.1%
Simplified92.1%
Taylor expanded in a around inf 73.9%
+-commutative73.9%
associate-/l*72.9%
associate-/r/77.4%
Simplified77.4%
if 1.05000000000000004e-68 < z < 1.25000000000000005e120Initial program 94.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in a around 0 84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in z around 0 71.7%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.22e+168)
(+ t x)
(if (<= z -6.5e-19)
(- x (* y (/ t z)))
(if (<= z 3.7e-65)
(+ x (* y (/ t a)))
(if (<= z 1.45e+120) (- x (/ (* y t) z)) (+ t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.22e+168) {
tmp = t + x;
} else if (z <= -6.5e-19) {
tmp = x - (y * (t / z));
} else if (z <= 3.7e-65) {
tmp = x + (y * (t / a));
} else if (z <= 1.45e+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 <= (-1.22d+168)) then
tmp = t + x
else if (z <= (-6.5d-19)) then
tmp = x - (y * (t / z))
else if (z <= 3.7d-65) then
tmp = x + (y * (t / a))
else if (z <= 1.45d+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 <= -1.22e+168) {
tmp = t + x;
} else if (z <= -6.5e-19) {
tmp = x - (y * (t / z));
} else if (z <= 3.7e-65) {
tmp = x + (y * (t / a));
} else if (z <= 1.45e+120) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.22e+168: tmp = t + x elif z <= -6.5e-19: tmp = x - (y * (t / z)) elif z <= 3.7e-65: tmp = x + (y * (t / a)) elif z <= 1.45e+120: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.22e+168) tmp = Float64(t + x); elseif (z <= -6.5e-19) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 3.7e-65) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.45e+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 <= -1.22e+168) tmp = t + x; elseif (z <= -6.5e-19) tmp = x - (y * (t / z)); elseif (z <= 3.7e-65) tmp = x + (y * (t / a)); elseif (z <= 1.45e+120) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.22e+168], N[(t + x), $MachinePrecision], If[LessEqual[z, -6.5e-19], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-65], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+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 -1.22 \cdot 10^{+168}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-19}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-65}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -1.21999999999999991e168 or 1.4500000000000001e120 < z Initial program 63.3%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.6%
if -1.21999999999999991e168 < z < -6.5000000000000001e-19Initial program 88.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in y around inf 77.7%
*-commutative77.7%
associate-*r/81.9%
Simplified81.9%
Taylor expanded in a around 0 77.5%
associate-*r/77.5%
neg-mul-177.5%
Simplified77.5%
if -6.5000000000000001e-19 < z < 3.7e-65Initial program 96.2%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in y around inf 90.3%
*-commutative90.3%
associate-*r/92.1%
Simplified92.1%
Taylor expanded in a around inf 73.9%
+-commutative73.9%
associate-/l*72.9%
associate-/r/77.4%
Simplified77.4%
if 3.7e-65 < z < 1.4500000000000001e120Initial program 94.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in a around 0 84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in z around 0 71.7%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.1e+170)
(+ t x)
(if (<= z -4.3e-19)
(- x (* t (/ y z)))
(if (<= z 3.1e+25) (+ x (* y (/ t a))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.1e+170) {
tmp = t + x;
} else if (z <= -4.3e-19) {
tmp = x - (t * (y / z));
} else if (z <= 3.1e+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 <= (-2.1d+170)) then
tmp = t + x
else if (z <= (-4.3d-19)) then
tmp = x - (t * (y / z))
else if (z <= 3.1d+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 <= -2.1e+170) {
tmp = t + x;
} else if (z <= -4.3e-19) {
tmp = x - (t * (y / z));
} else if (z <= 3.1e+25) {
tmp = x + (y * (t / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.1e+170: tmp = t + x elif z <= -4.3e-19: tmp = x - (t * (y / z)) elif z <= 3.1e+25: tmp = x + (y * (t / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.1e+170) tmp = Float64(t + x); elseif (z <= -4.3e-19) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 3.1e+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 <= -2.1e+170) tmp = t + x; elseif (z <= -4.3e-19) tmp = x - (t * (y / z)); elseif (z <= 3.1e+25) tmp = x + (y * (t / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.1e+170], N[(t + x), $MachinePrecision], If[LessEqual[z, -4.3e-19], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+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 -2.1 \cdot 10^{+170}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-19}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+25}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -2.09999999999999998e170 or 3.0999999999999998e25 < z Initial program 69.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.6%
if -2.09999999999999998e170 < z < -4.3e-19Initial program 88.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in y around inf 77.7%
*-commutative77.7%
associate-*r/81.9%
Simplified81.9%
Taylor expanded in a around 0 73.3%
mul-1-neg73.3%
unsub-neg73.3%
associate-*r/75.4%
Simplified75.4%
if -4.3e-19 < z < 3.0999999999999998e25Initial program 96.0%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in y around inf 89.4%
*-commutative89.4%
associate-*r/90.9%
Simplified90.9%
Taylor expanded in a around inf 71.5%
+-commutative71.5%
associate-/l*70.6%
associate-/r/74.5%
Simplified74.5%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -54.0) (not (<= z 2.9e+21))) (+ x (* t (- 1.0 (/ 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 * (1.0 - (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 * (1.0d0 - (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 * (1.0 - (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 * (1.0 - (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(1.0 - 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 * (1.0 - (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[(1.0 - 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 + t \cdot \left(1 - \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/99.9%
Simplified99.9%
Taylor expanded in a around 0 90.8%
mul-1-neg90.8%
div-sub90.8%
sub-neg90.8%
*-inverses90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in y around 0 81.0%
mul-1-neg81.0%
*-commutative81.0%
associate-*l/90.8%
distribute-lft-neg-out90.8%
distribute-frac-neg90.8%
*-lft-identity90.8%
distribute-rgt-in90.8%
distribute-frac-neg90.8%
sub-neg90.8%
Simplified90.8%
if -54 < z < 2.9e21Initial program 96.9%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
associate-*r/91.0%
Simplified91.0%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.8e+58) (+ x (* y (/ t a))) (if (<= a 1.36e-28) (+ x (* t (- 1.0 (/ y z)))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.8e+58) {
tmp = x + (y * (t / a));
} else if (a <= 1.36e-28) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.8d+58)) then
tmp = x + (y * (t / a))
else if (a <= 1.36d-28) then
tmp = x + (t * (1.0d0 - (y / z)))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.8e+58) {
tmp = x + (y * (t / a));
} else if (a <= 1.36e-28) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.8e+58: tmp = x + (y * (t / a)) elif a <= 1.36e-28: tmp = x + (t * (1.0 - (y / z))) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.8e+58) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (a <= 1.36e-28) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.8e+58) tmp = x + (y * (t / a)); elseif (a <= 1.36e-28) tmp = x + (t * (1.0 - (y / z))); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.8e+58], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.36e-28], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{+58}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{-28}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -9.80000000000000037e58Initial program 81.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
associate-*r/81.2%
Simplified81.2%
Taylor expanded in a around inf 74.3%
+-commutative74.3%
associate-/l*78.2%
associate-/r/78.9%
Simplified78.9%
if -9.80000000000000037e58 < a < 1.35999999999999989e-28Initial program 89.3%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in a around 0 85.2%
mul-1-neg85.2%
div-sub85.2%
sub-neg85.2%
*-inverses85.2%
metadata-eval85.2%
Simplified85.2%
Taylor expanded in y around 0 84.4%
mul-1-neg84.4%
*-commutative84.4%
associate-*l/85.2%
distribute-lft-neg-out85.2%
distribute-frac-neg85.2%
*-lft-identity85.2%
distribute-rgt-in85.2%
distribute-frac-neg85.2%
sub-neg85.2%
Simplified85.2%
if 1.35999999999999989e-28 < a Initial program 78.6%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around 0 82.2%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -205.0) (- x (* t (/ (- y z) z))) (if (<= z 2.6e+21) (+ x (* y (/ t (- a z)))) (+ x (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -205.0) {
tmp = x - (t * ((y - z) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t * (1.0 - (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 * ((y - z) / z))
else if (z <= 2.6d+21) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (t * (1.0d0 - (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 * ((y - z) / z));
} else if (z <= 2.6e+21) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t * (1.0 - (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -205.0: tmp = x - (t * ((y - z) / z)) elif z <= 2.6e+21: tmp = x + (y * (t / (a - z))) else: tmp = x + (t * (1.0 - (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(y - z) / z))); elseif (z <= 2.6e+21) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t * Float64(1.0 - 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 * ((y - z) / z)); elseif (z <= 2.6e+21) tmp = x + (y * (t / (a - z))); else tmp = x + (t * (1.0 - (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -205.0], N[(x - N[(t * N[(N[(y - z), $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[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -205:\\
\;\;\;\;x - t \cdot \frac{y - z}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -205Initial program 76.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 71.5%
mul-1-neg71.5%
unsub-neg71.5%
associate-/l*91.4%
Simplified91.4%
clear-num91.4%
associate-/r/91.4%
clear-num91.4%
Applied egg-rr91.4%
if -205 < z < 2.6e21Initial program 96.9%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
associate-*r/91.0%
Simplified91.0%
if 2.6e21 < z Initial program 72.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in a around 0 89.9%
mul-1-neg89.9%
div-sub89.9%
sub-neg89.9%
*-inverses89.9%
metadata-eval89.9%
Simplified89.9%
Taylor expanded in y around 0 80.2%
mul-1-neg80.2%
*-commutative80.2%
associate-*l/89.9%
distribute-lft-neg-out89.9%
distribute-frac-neg89.9%
*-lft-identity89.9%
distribute-rgt-in89.9%
distribute-frac-neg89.9%
sub-neg89.9%
Simplified89.9%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -40.0) (not (<= z 1.7e+25))) (+ t x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -40.0) || !(z <= 1.7e+25)) {
tmp = t + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-40.0d0)) .or. (.not. (z <= 1.7d+25))) then
tmp = t + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -40.0) || !(z <= 1.7e+25)) {
tmp = t + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -40.0) or not (z <= 1.7e+25): tmp = t + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -40.0) || !(z <= 1.7e+25)) tmp = Float64(t + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -40.0) || ~((z <= 1.7e+25))) tmp = t + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -40.0], N[Not[LessEqual[z, 1.7e+25]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -40 \lor \neg \left(z \leq 1.7 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -40 or 1.69999999999999992e25 < z Initial program 75.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.9%
if -40 < z < 1.69999999999999992e25Initial program 96.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in z around 0 70.0%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -75.0) (not (<= z 2.5e+25))) (+ t x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -75.0) || !(z <= 2.5e+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 <= (-75.0d0)) .or. (.not. (z <= 2.5d+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 <= -75.0) || !(z <= 2.5e+25)) {
tmp = t + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -75.0) or not (z <= 2.5e+25): tmp = t + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -75.0) || !(z <= 2.5e+25)) tmp = Float64(t + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -75.0) || ~((z <= 2.5e+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, -75.0], N[Not[LessEqual[z, 2.5e+25]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -75 \lor \neg \left(z \leq 2.5 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -75 or 2.50000000000000012e25 < z Initial program 75.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.9%
if -75 < z < 2.50000000000000012e25Initial program 96.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in z around 0 70.9%
Final simplification72.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -40.0) (not (<= z 1.36e+25))) (+ t x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -40.0) || !(z <= 1.36e+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 <= (-40.0d0)) .or. (.not. (z <= 1.36d+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 <= -40.0) || !(z <= 1.36e+25)) {
tmp = t + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -40.0) or not (z <= 1.36e+25): tmp = t + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -40.0) || !(z <= 1.36e+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 <= -40.0) || ~((z <= 1.36e+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, -40.0], N[Not[LessEqual[z, 1.36e+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 -40 \lor \neg \left(z \leq 1.36 \cdot 10^{+25}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -40 or 1.36e25 < z Initial program 75.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.9%
if -40 < z < 1.36e25Initial program 96.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in y around inf 89.0%
*-commutative89.0%
associate-*r/90.4%
Simplified90.4%
Taylor expanded in a around inf 70.9%
+-commutative70.9%
associate-/l*70.0%
associate-/r/73.7%
Simplified73.7%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -70.0) (not (<= z 3.4e-71))) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -70.0) || !(z <= 3.4e-71)) {
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 <= (-70.0d0)) .or. (.not. (z <= 3.4d-71))) 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 <= -70.0) || !(z <= 3.4e-71)) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -70.0) or not (z <= 3.4e-71): tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -70.0) || !(z <= 3.4e-71)) 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 <= -70.0) || ~((z <= 3.4e-71))) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -70.0], N[Not[LessEqual[z, 3.4e-71]], $MachinePrecision]], N[(t + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -70 \lor \neg \left(z \leq 3.4 \cdot 10^{-71}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -70 or 3.40000000000000003e-71 < z Initial program 77.6%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in z around inf 69.7%
if -70 < z < 3.40000000000000003e-71Initial program 96.3%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in x around inf 48.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.45e+199) t (if (<= t 3.1e+169) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.45e+199) {
tmp = t;
} else if (t <= 3.1e+169) {
tmp = x;
} else {
tmp = 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 (t <= (-1.45d+199)) then
tmp = t
else if (t <= 3.1d+169) then
tmp = x
else
tmp = t
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.45e+199) {
tmp = t;
} else if (t <= 3.1e+169) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.45e+199: tmp = t elif t <= 3.1e+169: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.45e+199) tmp = t; elseif (t <= 3.1e+169) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.45e+199) tmp = t; elseif (t <= 3.1e+169) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.45e+199], t, If[LessEqual[t, 3.1e+169], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+199}:\\
\;\;\;\;t\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+169}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if t < -1.4499999999999999e199 or 3.1e169 < t Initial program 60.1%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 40.1%
Taylor expanded in x around 0 34.9%
if -1.4499999999999999e199 < t < 3.1e169Initial program 91.5%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in x around inf 58.2%
Final simplification53.5%
(FPCore (x y z t a) :precision binary64 (+ x (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + (t * ((y - z) / (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 + (t * ((y - z) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t * ((y - z) / (a - z)));
}
def code(x, y, z, t, a): return x + (t * ((y - z) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + (t * ((y - z) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + t \cdot \frac{y - z}{a - z}
\end{array}
Initial program 85.1%
associate-*l/96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 85.1%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in z around inf 56.2%
Taylor expanded in x around 0 16.7%
Final simplification16.7%
(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
:herbie-target
(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))))