
(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 16 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) t) (- a z))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- y z) (/ (- a z) t)))
(if (<= t_1 20000000.0) (+ t_1 x) (fma (- y z) (/ t (- a z)) 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 <= -((double) INFINITY)) {
tmp = x + ((y - z) / ((a - z) / t));
} else if (t_1 <= 20000000.0) {
tmp = t_1 + x;
} else {
tmp = fma((y - z), (t / (a - z)), 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 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); elseif (t_1 <= 20000000.0) tmp = Float64(t_1 + x); else tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x); end return 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, 20000000.0], N[(t$95$1 + x), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $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 20000000:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 45.2%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e7Initial program 99.3%
if 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 65.0%
+-commutative65.0%
associate-/l*99.7%
fma-define99.7%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y z) t) (- a z))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 20000000.0)))
(+ x (* (- y z) (/ t (- 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 <= -((double) INFINITY)) || !(t_1 <= 20000000.0)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1 + x;
}
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 <= 20000000.0)) {
tmp = x + ((y - z) * (t / (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 <= -math.inf) or not (t_1 <= 20000000.0): tmp = x + ((y - z) * (t / (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 <= Float64(-Inf)) || !(t_1 <= 20000000.0)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / 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 <= -Inf) || ~((t_1 <= 20000000.0))) tmp = x + ((y - z) * (t / (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, (-Infinity)], N[Not[LessEqual[t$95$1, 20000000.0]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / 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 -\infty \lor \neg \left(t\_1 \leq 20000000\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 58.4%
associate-/l*99.7%
Simplified99.7%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e7Initial program 99.3%
Final simplification99.4%
(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 20000000.0) (+ t_1 x) (+ x (* (- y z) (/ t (- 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 <= 20000000.0) {
tmp = t_1 + x;
} else {
tmp = x + ((y - z) * (t / (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 <= 20000000.0) {
tmp = t_1 + x;
} else {
tmp = x + ((y - z) * (t / (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 <= 20000000.0: tmp = t_1 + x else: tmp = x + ((y - z) * (t / (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 <= 20000000.0) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(Float64(y - z) * Float64(t / 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 <= 20000000.0) tmp = t_1 + x; else tmp = x + ((y - z) * (t / (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, 20000000.0], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / 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 20000000:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0Initial program 45.2%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2e7Initial program 99.3%
if 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 65.0%
associate-/l*99.7%
Simplified99.7%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ t (/ z y)))))
(if (<= z -7.2e+183)
(+ t x)
(if (<= z -3.1e-7)
t_1
(if (<= z 4.4e-60)
(+ x (* y (/ t a)))
(if (<= z 3.55e+143) 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 <= -7.2e+183) {
tmp = t + x;
} else if (z <= -3.1e-7) {
tmp = t_1;
} else if (z <= 4.4e-60) {
tmp = x + (y * (t / a));
} else if (z <= 3.55e+143) {
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 <= (-7.2d+183)) then
tmp = t + x
else if (z <= (-3.1d-7)) then
tmp = t_1
else if (z <= 4.4d-60) then
tmp = x + (y * (t / a))
else if (z <= 3.55d+143) 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 <= -7.2e+183) {
tmp = t + x;
} else if (z <= -3.1e-7) {
tmp = t_1;
} else if (z <= 4.4e-60) {
tmp = x + (y * (t / a));
} else if (z <= 3.55e+143) {
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 <= -7.2e+183: tmp = t + x elif z <= -3.1e-7: tmp = t_1 elif z <= 4.4e-60: tmp = x + (y * (t / a)) elif z <= 3.55e+143: 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 <= -7.2e+183) tmp = Float64(t + x); elseif (z <= -3.1e-7) tmp = t_1; elseif (z <= 4.4e-60) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.55e+143) 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 <= -7.2e+183) tmp = t + x; elseif (z <= -3.1e-7) tmp = t_1; elseif (z <= 4.4e-60) tmp = x + (y * (t / a)); elseif (z <= 3.55e+143) 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, -7.2e+183], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.1e-7], t$95$1, If[LessEqual[z, 4.4e-60], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.55e+143], 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 -7.2 \cdot 10^{+183}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -7.20000000000000046e183 or 3.55000000000000021e143 < z Initial program 56.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around inf 87.0%
if -7.20000000000000046e183 < z < -3.1e-7 or 4.3999999999999998e-60 < z < 3.55000000000000021e143Initial program 83.5%
+-commutative83.5%
associate-/l*95.5%
fma-define95.5%
Simplified95.5%
Taylor expanded in a around 0 68.6%
mul-1-neg68.6%
unsub-neg68.6%
associate-/l*73.1%
Simplified73.1%
clear-num73.1%
un-div-inv73.2%
Applied egg-rr73.2%
Taylor expanded in z around 0 62.8%
if -3.1e-7 < z < 4.3999999999999998e-60Initial program 96.6%
+-commutative96.6%
associate-/l*97.9%
fma-define97.9%
Simplified97.9%
Taylor expanded in z around 0 80.2%
+-commutative80.2%
Simplified80.2%
clear-num80.2%
*-commutative80.2%
associate-/l/82.6%
associate-/r/82.6%
clear-num83.2%
Applied egg-rr83.2%
Final simplification77.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* t (/ y z)))))
(if (<= z -1.24e+185)
(+ t x)
(if (<= z -2.35e-5)
t_1
(if (<= z 5.2e-60)
(+ x (* y (/ t a)))
(if (<= z 3.55e+143) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / z));
double tmp;
if (z <= -1.24e+185) {
tmp = t + x;
} else if (z <= -2.35e-5) {
tmp = t_1;
} else if (z <= 5.2e-60) {
tmp = x + (y * (t / a));
} else if (z <= 3.55e+143) {
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 / z))
if (z <= (-1.24d+185)) then
tmp = t + x
else if (z <= (-2.35d-5)) then
tmp = t_1
else if (z <= 5.2d-60) then
tmp = x + (y * (t / a))
else if (z <= 3.55d+143) 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 / z));
double tmp;
if (z <= -1.24e+185) {
tmp = t + x;
} else if (z <= -2.35e-5) {
tmp = t_1;
} else if (z <= 5.2e-60) {
tmp = x + (y * (t / a));
} else if (z <= 3.55e+143) {
tmp = t_1;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * (y / z)) tmp = 0 if z <= -1.24e+185: tmp = t + x elif z <= -2.35e-5: tmp = t_1 elif z <= 5.2e-60: tmp = x + (y * (t / a)) elif z <= 3.55e+143: tmp = t_1 else: tmp = t + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -1.24e+185) tmp = Float64(t + x); elseif (z <= -2.35e-5) tmp = t_1; elseif (z <= 5.2e-60) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.55e+143) 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 / z)); tmp = 0.0; if (z <= -1.24e+185) tmp = t + x; elseif (z <= -2.35e-5) tmp = t_1; elseif (z <= 5.2e-60) tmp = x + (y * (t / a)); elseif (z <= 3.55e+143) 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 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.24e+185], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.35e-5], t$95$1, If[LessEqual[z, 5.2e-60], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.55e+143], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.24 \cdot 10^{+185}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -1.2399999999999999e185 or 3.55000000000000021e143 < z Initial program 56.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around inf 87.0%
if -1.2399999999999999e185 < z < -2.34999999999999986e-5 or 5.1999999999999995e-60 < z < 3.55000000000000021e143Initial program 83.5%
+-commutative83.5%
associate-/l*95.5%
fma-define95.5%
Simplified95.5%
Taylor expanded in a around 0 68.6%
mul-1-neg68.6%
unsub-neg68.6%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in y around inf 58.3%
associate-/l*62.8%
Simplified62.8%
if -2.34999999999999986e-5 < z < 5.1999999999999995e-60Initial program 96.6%
+-commutative96.6%
associate-/l*97.9%
fma-define97.9%
Simplified97.9%
Taylor expanded in z around 0 80.2%
+-commutative80.2%
Simplified80.2%
clear-num80.2%
*-commutative80.2%
associate-/l/82.6%
associate-/r/82.6%
clear-num83.2%
Applied egg-rr83.2%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.55e+97) (not (<= y 7.2e-30))) (+ x (* y (/ t (- a z)))) (+ x (/ t (- 1.0 (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+97) || !(y <= 7.2e-30)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t / (1.0 - (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 ((y <= (-1.55d+97)) .or. (.not. (y <= 7.2d-30))) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (t / (1.0d0 - (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 ((y <= -1.55e+97) || !(y <= 7.2e-30)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t / (1.0 - (a / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.55e+97) or not (y <= 7.2e-30): tmp = x + (y * (t / (a - z))) else: tmp = x + (t / (1.0 - (a / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.55e+97) || !(y <= 7.2e-30)) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t / Float64(1.0 - Float64(a / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.55e+97) || ~((y <= 7.2e-30))) tmp = x + (y * (t / (a - z))); else tmp = x + (t / (1.0 - (a / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e+97], N[Not[LessEqual[y, 7.2e-30]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+97} \lor \neg \left(y \leq 7.2 \cdot 10^{-30}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{1 - \frac{a}{z}}\\
\end{array}
\end{array}
if y < -1.54999999999999991e97 or 7.2000000000000006e-30 < y Initial program 81.7%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in y around inf 89.3%
if -1.54999999999999991e97 < y < 7.2000000000000006e-30Initial program 84.2%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in y around 0 77.8%
mul-1-neg77.8%
associate-/l*92.8%
distribute-rgt-neg-in92.8%
distribute-neg-frac292.8%
neg-sub092.8%
sub-neg92.8%
+-commutative92.8%
associate--r+92.8%
neg-sub092.8%
remove-double-neg92.8%
Simplified92.8%
+-commutative92.8%
*-un-lft-identity92.8%
fma-define92.8%
clear-num92.7%
un-div-inv92.8%
div-sub92.8%
*-inverses92.8%
Applied egg-rr92.8%
fma-undefine92.8%
*-lft-identity92.8%
Simplified92.8%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.55e+97) (not (<= y 8e-30))) (+ x (* y (/ t (- a z)))) (+ x (* t (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+97) || !(y <= 8e-30)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.55d+97)) .or. (.not. (y <= 8d-30))) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (t * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.55e+97) || !(y <= 8e-30)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (t * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.55e+97) or not (y <= 8e-30): tmp = x + (y * (t / (a - z))) else: tmp = x + (t * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.55e+97) || !(y <= 8e-30)) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(t * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.55e+97) || ~((y <= 8e-30))) tmp = x + (y * (t / (a - z))); else tmp = x + (t * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e+97], N[Not[LessEqual[y, 8e-30]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+97} \lor \neg \left(y \leq 8 \cdot 10^{-30}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if y < -1.54999999999999991e97 or 8.000000000000001e-30 < y Initial program 81.7%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in y around inf 89.3%
if -1.54999999999999991e97 < y < 8.000000000000001e-30Initial program 84.2%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in y around 0 77.8%
mul-1-neg77.8%
associate-/l*92.8%
distribute-rgt-neg-in92.8%
distribute-neg-frac292.8%
neg-sub092.8%
sub-neg92.8%
+-commutative92.8%
associate--r+92.8%
neg-sub092.8%
remove-double-neg92.8%
Simplified92.8%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.05e+131) (- x (/ t (/ z y))) (if (<= y 3.2e+16) (+ x (* t (/ z (- z a)))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+131) {
tmp = x - (t / (z / y));
} else if (y <= 3.2e+16) {
tmp = x + (t * (z / (z - a)));
} 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 (y <= (-1.05d+131)) then
tmp = x - (t / (z / y))
else if (y <= 3.2d+16) then
tmp = x + (t * (z / (z - a)))
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 (y <= -1.05e+131) {
tmp = x - (t / (z / y));
} else if (y <= 3.2e+16) {
tmp = x + (t * (z / (z - a)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.05e+131: tmp = x - (t / (z / y)) elif y <= 3.2e+16: tmp = x + (t * (z / (z - a))) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.05e+131) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (y <= 3.2e+16) tmp = Float64(x + Float64(t * Float64(z / Float64(z - a)))); 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 (y <= -1.05e+131) tmp = x - (t / (z / y)); elseif (y <= 3.2e+16) tmp = x + (t * (z / (z - a))); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.05e+131], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+16], N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+131}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+16}:\\
\;\;\;\;x + t \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -1.04999999999999993e131Initial program 77.7%
+-commutative77.7%
associate-/l*93.3%
fma-define93.3%
Simplified93.3%
Taylor expanded in a around 0 54.4%
mul-1-neg54.4%
unsub-neg54.4%
associate-/l*68.9%
Simplified68.9%
clear-num69.0%
un-div-inv69.0%
Applied egg-rr69.0%
Taylor expanded in z around 0 64.0%
if -1.04999999999999993e131 < y < 3.2e16Initial program 84.3%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 75.1%
mul-1-neg75.1%
associate-/l*89.4%
distribute-rgt-neg-in89.4%
distribute-neg-frac289.4%
neg-sub089.4%
sub-neg89.4%
+-commutative89.4%
associate--r+89.4%
neg-sub089.4%
remove-double-neg89.4%
Simplified89.4%
if 3.2e16 < y Initial program 83.0%
+-commutative83.0%
associate-/l*97.7%
fma-define97.7%
Simplified97.7%
Taylor expanded in z around 0 54.8%
+-commutative54.8%
Simplified54.8%
clear-num54.8%
*-commutative54.8%
associate-/l/66.2%
associate-/r/66.2%
clear-num67.1%
Applied egg-rr67.1%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.12e+86) (not (<= z 3.55e+143))) (+ t x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.12e+86) || !(z <= 3.55e+143)) {
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 <= (-1.12d+86)) .or. (.not. (z <= 3.55d+143))) 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 <= -1.12e+86) || !(z <= 3.55e+143)) {
tmp = t + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.12e+86) or not (z <= 3.55e+143): tmp = t + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.12e+86) || !(z <= 3.55e+143)) 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 <= -1.12e+86) || ~((z <= 3.55e+143))) tmp = t + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.12e+86], N[Not[LessEqual[z, 3.55e+143]], $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 -1.12 \cdot 10^{+86} \lor \neg \left(z \leq 3.55 \cdot 10^{+143}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.12e86 or 3.55000000000000021e143 < z Initial program 59.5%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around inf 78.9%
if -1.12e86 < z < 3.55000000000000021e143Initial program 93.1%
+-commutative93.1%
associate-/l*98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in z around 0 66.6%
+-commutative66.6%
Simplified66.6%
clear-num66.6%
*-commutative66.6%
associate-/l/70.8%
associate-/r/70.8%
clear-num71.2%
Applied egg-rr71.2%
Final simplification73.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+85) (not (<= z 3.55e+143))) (+ t x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+85) || !(z <= 3.55e+143)) {
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 <= (-1.45d+85)) .or. (.not. (z <= 3.55d+143))) 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 <= -1.45e+85) || !(z <= 3.55e+143)) {
tmp = t + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+85) or not (z <= 3.55e+143): tmp = t + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+85) || !(z <= 3.55e+143)) 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 <= -1.45e+85) || ~((z <= 3.55e+143))) tmp = t + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+85], N[Not[LessEqual[z, 3.55e+143]], $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 -1.45 \cdot 10^{+85} \lor \neg \left(z \leq 3.55 \cdot 10^{+143}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.44999999999999999e85 or 3.55000000000000021e143 < z Initial program 59.5%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in z around inf 78.9%
if -1.44999999999999999e85 < z < 3.55000000000000021e143Initial program 93.1%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in z around 0 66.6%
associate-/l*69.2%
Simplified69.2%
Final simplification72.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.7e+167) (not (<= t 1.3e+97))) (* t (- 1.0 (/ y z))) (+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.7e+167) || !(t <= 1.3e+97)) {
tmp = t * (1.0 - (y / 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 ((t <= (-4.7d+167)) .or. (.not. (t <= 1.3d+97))) then
tmp = t * (1.0d0 - (y / 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 ((t <= -4.7e+167) || !(t <= 1.3e+97)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.7e+167) or not (t <= 1.3e+97): tmp = t * (1.0 - (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.7e+167) || !(t <= 1.3e+97)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.7e+167) || ~((t <= 1.3e+97))) tmp = t * (1.0 - (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.7e+167], N[Not[LessEqual[t, 1.3e+97]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+167} \lor \neg \left(t \leq 1.3 \cdot 10^{+97}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if t < -4.70000000000000013e167 or 1.3e97 < t Initial program 65.7%
+-commutative65.7%
associate-/l*97.6%
fma-define97.6%
Simplified97.6%
Taylor expanded in a around 0 40.2%
mul-1-neg40.2%
unsub-neg40.2%
associate-/l*63.4%
Simplified63.4%
clear-num63.4%
un-div-inv63.4%
Applied egg-rr63.4%
Taylor expanded in t around inf 53.8%
if -4.70000000000000013e167 < t < 1.3e97Initial program 91.5%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around inf 69.1%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -1e+131) (/ t (/ z (- y))) (+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1e+131) {
tmp = t / (z / -y);
} 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 <= (-1d+131)) then
tmp = t / (z / -y)
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 <= -1e+131) {
tmp = t / (z / -y);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1e+131: tmp = t / (z / -y) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1e+131) tmp = Float64(t / Float64(z / Float64(-y))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1e+131) tmp = t / (z / -y); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1e+131], N[(t / N[(z / (-y)), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+131}:\\
\;\;\;\;\frac{t}{\frac{z}{-y}}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if y < -9.9999999999999991e130Initial program 77.7%
+-commutative77.7%
associate-/l*93.3%
fma-define93.3%
Simplified93.3%
Taylor expanded in a around 0 54.4%
mul-1-neg54.4%
unsub-neg54.4%
associate-/l*68.9%
Simplified68.9%
clear-num69.0%
un-div-inv69.0%
Applied egg-rr69.0%
Taylor expanded in z around 0 38.8%
mul-1-neg38.8%
associate-/l*50.7%
distribute-lft-neg-in50.7%
Simplified50.7%
clear-num50.7%
un-div-inv50.8%
distribute-neg-frac50.8%
distribute-neg-frac250.8%
distribute-neg-frac250.8%
Applied egg-rr50.8%
if -9.9999999999999991e130 < y Initial program 83.9%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 61.3%
Final simplification59.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.05e+131) (* t (/ y (- z))) (+ t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+131) {
tmp = t * (y / -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 <= (-1.05d+131)) then
tmp = t * (y / -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 <= -1.05e+131) {
tmp = t * (y / -z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.05e+131: tmp = t * (y / -z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.05e+131) tmp = Float64(t * Float64(y / Float64(-z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.05e+131) tmp = t * (y / -z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.05e+131], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+131}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if y < -1.04999999999999993e131Initial program 77.7%
+-commutative77.7%
associate-/l*93.3%
fma-define93.3%
Simplified93.3%
Taylor expanded in a around 0 54.4%
mul-1-neg54.4%
unsub-neg54.4%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in y around inf 38.8%
mul-1-neg38.8%
associate-/l*50.7%
distribute-rgt-neg-in50.7%
distribute-frac-neg250.7%
Simplified50.7%
if -1.04999999999999993e131 < y Initial program 83.9%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 61.3%
Final simplification59.7%
(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 83.0%
associate-/l*96.0%
Simplified96.0%
(FPCore (x y z t a) :precision binary64 (if (<= a 2.8e+159) (+ t x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 2.8e+159) {
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 (a <= 2.8d+159) 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 (a <= 2.8e+159) {
tmp = t + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 2.8e+159: tmp = t + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 2.8e+159) tmp = Float64(t + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 2.8e+159) tmp = t + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 2.8e+159], N[(t + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.8 \cdot 10^{+159}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 2.8000000000000001e159Initial program 83.3%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in z around inf 57.2%
if 2.8000000000000001e159 < a Initial program 81.2%
+-commutative81.2%
associate-/l*97.2%
fma-define97.2%
Simplified97.2%
Taylor expanded in t around 0 73.2%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 83.0%
+-commutative83.0%
associate-/l*96.0%
fma-define96.0%
Simplified96.0%
Taylor expanded in t around 0 48.5%
(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 2024163
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))
(+ x (/ (* (- y z) t) (- a z))))