
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-305)
t_2
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 2e+250) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-305) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+250) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-305) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+250) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-305: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 2e+250: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-305) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 2e+250) tmp = t_2; 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 - x))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-305) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 2e+250) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-305], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+250], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+250}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.9999999999999998e250 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 45.8%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.0%
Applied egg-rr85.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999985e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.9999999999999998e250Initial program 95.9%
if -4.99999999999999985e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6499.6%
Simplified99.6%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-305)
t_2
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 1e+252) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-305) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 1e+252) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-305) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 1e+252) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-305: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 1e+252: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-305) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 1e+252) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-305) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 1e+252) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-305], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+252], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{+252}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.0000000000000001e252 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 45.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6484.8%
Applied egg-rr84.8%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999985e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.0000000000000001e252Initial program 95.9%
if -4.99999999999999985e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6499.6%
Simplified99.6%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (* (- y z) (/ -1.0 (- z a))))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -5e-305)
t_1
(if (<= t_2 0.0) (+ t (/ (* (- t x) (- a y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * ((y - z) * (-1.0 / (z - a))));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-305) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / 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) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * ((y - z) * ((-1.0d0) / (z - a))))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-5d-305)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t + (((t - x) * (a - y)) / 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 + ((t - x) * ((y - z) * (-1.0 / (z - a))));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-305) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * ((y - z) * (-1.0 / (z - a)))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -5e-305: tmp = t_1 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) * Float64(-1.0 / Float64(z - a))))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -5e-305) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * ((y - z) * (-1.0 / (z - a)))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -5e-305) tmp = t_1; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] * N[(-1.0 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-305], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{-1}{z - a}\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999985e-305 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 77.1%
associate-/l*N/A
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.2%
Applied egg-rr91.2%
if -4.99999999999999985e-305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 3.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6499.6%
Simplified99.6%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.35e+111)
x
(if (<= a -16200.0)
(* a (/ (- t x) z))
(if (<= a 1.5e-270)
t
(if (<= a 3.6e-111) (/ (* x y) z) (if (<= a 8.4e+80) t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.35e+111) {
tmp = x;
} else if (a <= -16200.0) {
tmp = a * ((t - x) / z);
} else if (a <= 1.5e-270) {
tmp = t;
} else if (a <= 3.6e-111) {
tmp = (x * y) / z;
} else if (a <= 8.4e+80) {
tmp = t;
} 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.35d+111)) then
tmp = x
else if (a <= (-16200.0d0)) then
tmp = a * ((t - x) / z)
else if (a <= 1.5d-270) then
tmp = t
else if (a <= 3.6d-111) then
tmp = (x * y) / z
else if (a <= 8.4d+80) then
tmp = t
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.35e+111) {
tmp = x;
} else if (a <= -16200.0) {
tmp = a * ((t - x) / z);
} else if (a <= 1.5e-270) {
tmp = t;
} else if (a <= 3.6e-111) {
tmp = (x * y) / z;
} else if (a <= 8.4e+80) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.35e+111: tmp = x elif a <= -16200.0: tmp = a * ((t - x) / z) elif a <= 1.5e-270: tmp = t elif a <= 3.6e-111: tmp = (x * y) / z elif a <= 8.4e+80: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.35e+111) tmp = x; elseif (a <= -16200.0) tmp = Float64(a * Float64(Float64(t - x) / z)); elseif (a <= 1.5e-270) tmp = t; elseif (a <= 3.6e-111) tmp = Float64(Float64(x * y) / z); elseif (a <= 8.4e+80) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.35e+111) tmp = x; elseif (a <= -16200.0) tmp = a * ((t - x) / z); elseif (a <= 1.5e-270) tmp = t; elseif (a <= 3.6e-111) tmp = (x * y) / z; elseif (a <= 8.4e+80) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.35e+111], x, If[LessEqual[a, -16200.0], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-270], t, If[LessEqual[a, 3.6e-111], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 8.4e+80], t, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -16200:\\
\;\;\;\;a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-270}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{+80}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.35000000000000004e111 or 8.40000000000000005e80 < a Initial program 81.2%
Taylor expanded in a around inf
Simplified54.4%
if -2.35000000000000004e111 < a < -16200Initial program 69.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6451.2%
Simplified51.2%
Taylor expanded in a around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6440.0%
Simplified40.0%
if -16200 < a < 1.50000000000000006e-270 or 3.6000000000000001e-111 < a < 8.40000000000000005e80Initial program 64.2%
Taylor expanded in z around inf
Simplified41.0%
if 1.50000000000000006e-270 < a < 3.6000000000000001e-111Initial program 67.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6488.5%
Simplified88.5%
Taylor expanded in x around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6461.9%
Simplified61.9%
Taylor expanded in a around 0
/-lowering-/.f64N/A
*-lowering-*.f6453.4%
Simplified53.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= a -3.2e-35)
t_1
(if (<= a 1.65e-130) (+ t (/ (* (- t x) (- a y)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (a <= -3.2e-35) {
tmp = t_1;
} else if (a <= 1.65e-130) {
tmp = t + (((t - x) * (a - y)) / 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) * ((t - x) / (a - z)))
if (a <= (-3.2d-35)) then
tmp = t_1
else if (a <= 1.65d-130) then
tmp = t + (((t - x) * (a - y)) / 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) * ((t - x) / (a - z)));
double tmp;
if (a <= -3.2e-35) {
tmp = t_1;
} else if (a <= 1.65e-130) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if a <= -3.2e-35: tmp = t_1 elif a <= 1.65e-130: tmp = t + (((t - x) * (a - y)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (a <= -3.2e-35) tmp = t_1; elseif (a <= 1.65e-130) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (a <= -3.2e-35) tmp = t_1; elseif (a <= 1.65e-130) tmp = t + (((t - x) * (a - y)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e-35], t$95$1, If[LessEqual[a, 1.65e-130], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-130}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.1999999999999998e-35 or 1.6499999999999999e-130 < a Initial program 77.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
--lowering--.f6487.1%
Applied egg-rr87.1%
if -3.1999999999999998e-35 < a < 1.6499999999999999e-130Initial program 60.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6485.1%
Simplified85.1%
Final simplification86.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+106)
t
(if (<= z 1.8e-50)
(* x (- 1.0 (/ y a)))
(if (<= z 1.15e+122) (* x (/ (- y a) z)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+106) {
tmp = t;
} else if (z <= 1.8e-50) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.15e+122) {
tmp = x * ((y - a) / z);
} 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 (z <= (-1.7d+106)) then
tmp = t
else if (z <= 1.8d-50) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.15d+122) then
tmp = x * ((y - a) / z)
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 (z <= -1.7e+106) {
tmp = t;
} else if (z <= 1.8e-50) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.15e+122) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+106: tmp = t elif z <= 1.8e-50: tmp = x * (1.0 - (y / a)) elif z <= 1.15e+122: tmp = x * ((y - a) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+106) tmp = t; elseif (z <= 1.8e-50) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.15e+122) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+106) tmp = t; elseif (z <= 1.8e-50) tmp = x * (1.0 - (y / a)); elseif (z <= 1.15e+122) tmp = x * ((y - a) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+106], t, If[LessEqual[z, 1.8e-50], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+122], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-50}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+122}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.69999999999999997e106 or 1.15e122 < z Initial program 39.9%
Taylor expanded in z around inf
Simplified58.3%
if -1.69999999999999997e106 < z < 1.7999999999999999e-50Initial program 83.3%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.1%
Applied egg-rr84.1%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6466.1%
Simplified66.1%
Taylor expanded in t around 0
*-rgt-identityN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6452.0%
Simplified52.0%
if 1.7999999999999999e-50 < z < 1.15e122Initial program 87.0%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6461.1%
Simplified61.1%
Taylor expanded in x around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6441.7%
Simplified41.7%
sub0-negN/A
distribute-rgt-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f6441.7%
Applied egg-rr41.7%
Final simplification52.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.2e-12)
x
(if (<= a 1.15e-271)
t
(if (<= a 1.6e-111) (/ (* x y) z) (if (<= a 8.8e+80) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e-12) {
tmp = x;
} else if (a <= 1.15e-271) {
tmp = t;
} else if (a <= 1.6e-111) {
tmp = (x * y) / z;
} else if (a <= 8.8e+80) {
tmp = t;
} 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 <= (-5.2d-12)) then
tmp = x
else if (a <= 1.15d-271) then
tmp = t
else if (a <= 1.6d-111) then
tmp = (x * y) / z
else if (a <= 8.8d+80) then
tmp = t
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 <= -5.2e-12) {
tmp = x;
} else if (a <= 1.15e-271) {
tmp = t;
} else if (a <= 1.6e-111) {
tmp = (x * y) / z;
} else if (a <= 8.8e+80) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e-12: tmp = x elif a <= 1.15e-271: tmp = t elif a <= 1.6e-111: tmp = (x * y) / z elif a <= 8.8e+80: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e-12) tmp = x; elseif (a <= 1.15e-271) tmp = t; elseif (a <= 1.6e-111) tmp = Float64(Float64(x * y) / z); elseif (a <= 8.8e+80) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.2e-12) tmp = x; elseif (a <= 1.15e-271) tmp = t; elseif (a <= 1.6e-111) tmp = (x * y) / z; elseif (a <= 8.8e+80) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e-12], x, If[LessEqual[a, 1.15e-271], t, If[LessEqual[a, 1.6e-111], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 8.8e+80], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-271}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-111}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{+80}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.19999999999999965e-12 or 8.80000000000000011e80 < a Initial program 79.6%
Taylor expanded in a around inf
Simplified46.7%
if -5.19999999999999965e-12 < a < 1.15000000000000004e-271 or 1.5999999999999999e-111 < a < 8.80000000000000011e80Initial program 63.9%
Taylor expanded in z around inf
Simplified41.3%
if 1.15000000000000004e-271 < a < 1.5999999999999999e-111Initial program 67.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6488.5%
Simplified88.5%
Taylor expanded in x around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6461.9%
Simplified61.9%
Taylor expanded in a around 0
/-lowering-/.f64N/A
*-lowering-*.f6453.4%
Simplified53.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e+34)
(+ x (/ (- y z) (/ a (- t x))))
(if (<= a 1.05e+81)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (* (- y z) (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+34) {
tmp = x + ((y - z) / (a / (t - x)));
} else if (a <= 1.05e+81) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((y - z) * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d+34)) then
tmp = x + ((y - z) / (a / (t - x)))
else if (a <= 1.05d+81) then
tmp = t + (((t - x) * (a - y)) / z)
else
tmp = x + ((y - z) * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+34) {
tmp = x + ((y - z) / (a / (t - x)));
} else if (a <= 1.05e+81) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((y - z) * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e+34: tmp = x + ((y - z) / (a / (t - x))) elif a <= 1.05e+81: tmp = t + (((t - x) * (a - y)) / z) else: tmp = x + ((y - z) * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+34) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); elseif (a <= 1.05e+81) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e+34) tmp = x + ((y - z) / (a / (t - x))); elseif (a <= 1.05e+81) tmp = t + (((t - x) * (a - y)) / z); else tmp = x + ((y - z) * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+34], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e+81], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+34}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+81}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if a < -1.5999999999999999e34Initial program 77.1%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6486.4%
Applied egg-rr86.4%
Taylor expanded in a around inf
Simplified79.1%
if -1.5999999999999999e34 < a < 1.0499999999999999e81Initial program 64.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6475.9%
Simplified75.9%
if 1.0499999999999999e81 < a Initial program 83.8%
Taylor expanded in a around inf
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6487.5%
Simplified87.5%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7e-11)
(+ x (/ (- y z) (/ a (- t x))))
(if (<= a 1.1e-24)
(+ t (/ (* y (- x t)) z))
(+ x (* (- y z) (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7e-11) {
tmp = x + ((y - z) / (a / (t - x)));
} else if (a <= 1.1e-24) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((y - z) * ((t - x) / 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 <= (-7d-11)) then
tmp = x + ((y - z) / (a / (t - x)))
else if (a <= 1.1d-24) then
tmp = t + ((y * (x - t)) / z)
else
tmp = x + ((y - z) * ((t - x) / 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 <= -7e-11) {
tmp = x + ((y - z) / (a / (t - x)));
} else if (a <= 1.1e-24) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((y - z) * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7e-11: tmp = x + ((y - z) / (a / (t - x))) elif a <= 1.1e-24: tmp = t + ((y * (x - t)) / z) else: tmp = x + ((y - z) * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7e-11) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); elseif (a <= 1.1e-24) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7e-11) tmp = x + ((y - z) / (a / (t - x))); elseif (a <= 1.1e-24) tmp = t + ((y * (x - t)) / z); else tmp = x + ((y - z) * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7e-11], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e-24], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if a < -7.00000000000000038e-11Initial program 76.1%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.4%
Applied egg-rr84.4%
Taylor expanded in a around inf
Simplified76.1%
if -7.00000000000000038e-11 < a < 1.10000000000000001e-24Initial program 63.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6480.8%
Simplified80.8%
Taylor expanded in a around 0
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6477.2%
Simplified77.2%
if 1.10000000000000001e-24 < a Initial program 78.7%
Taylor expanded in a around inf
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6474.7%
Simplified74.7%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* (- y z) (/ (- t x) a))))) (if (<= a -3.2e-12) t_1 (if (<= a 2.2e-24) (+ t (/ (* y (- x t)) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -3.2e-12) {
tmp = t_1;
} else if (a <= 2.2e-24) {
tmp = t + ((y * (x - t)) / 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) * ((t - x) / a))
if (a <= (-3.2d-12)) then
tmp = t_1
else if (a <= 2.2d-24) then
tmp = t + ((y * (x - t)) / 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) * ((t - x) / a));
double tmp;
if (a <= -3.2e-12) {
tmp = t_1;
} else if (a <= 2.2e-24) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / a)) tmp = 0 if a <= -3.2e-12: tmp = t_1 elif a <= 2.2e-24: tmp = t + ((y * (x - t)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -3.2e-12) tmp = t_1; elseif (a <= 2.2e-24) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / a)); tmp = 0.0; if (a <= -3.2e-12) tmp = t_1; elseif (a <= 2.2e-24) tmp = t + ((y * (x - t)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e-12], t$95$1, If[LessEqual[a, 2.2e-24], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-24}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.2000000000000001e-12 or 2.20000000000000002e-24 < a Initial program 77.6%
Taylor expanded in a around inf
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.3%
Simplified75.3%
if -3.2000000000000001e-12 < a < 2.20000000000000002e-24Initial program 63.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6480.8%
Simplified80.8%
Taylor expanded in a around 0
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6477.2%
Simplified77.2%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e-10) (+ x (/ y (/ a (- t x)))) (if (<= a 6.5e-54) (+ t (/ (* y (- x t)) z)) (+ x (* (- t x) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-10) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 6.5e-54) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) * (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 <= (-1.7d-10)) then
tmp = x + (y / (a / (t - x)))
else if (a <= 6.5d-54) then
tmp = t + ((y * (x - t)) / z)
else
tmp = x + ((t - x) * (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 <= -1.7e-10) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 6.5e-54) {
tmp = t + ((y * (x - t)) / z);
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e-10: tmp = x + (y / (a / (t - x))) elif a <= 6.5e-54: tmp = t + ((y * (x - t)) / z) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e-10) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (a <= 6.5e-54) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e-10) tmp = x + (y / (a / (t - x))); elseif (a <= 6.5e-54) tmp = t + ((y * (x - t)) / z); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e-10], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-54], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-54}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -1.70000000000000007e-10Initial program 76.1%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.4%
Applied egg-rr84.4%
Taylor expanded in y around inf
Simplified69.9%
Taylor expanded in a around inf
/-lowering-/.f64N/A
--lowering--.f6466.4%
Simplified66.4%
if -1.70000000000000007e-10 < a < 6.49999999999999991e-54Initial program 64.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6482.9%
Simplified82.9%
Taylor expanded in a around 0
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6479.1%
Simplified79.1%
if 6.49999999999999991e-54 < a Initial program 77.0%
associate-/l*N/A
*-commutativeN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6492.4%
Applied egg-rr92.4%
Taylor expanded in z around 0
/-lowering-/.f6465.4%
Simplified65.4%
Final simplification72.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y z) (/ t (- a z)))))
(if (<= t -1.45e-68)
t_1
(if (<= t 2.2e+24) (* x (+ (/ y (- z a)) 1.0)) t_1))))
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.45e-68) {
tmp = t_1;
} else if (t <= 2.2e+24) {
tmp = x * ((y / (z - a)) + 1.0);
} 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 - z) * (t / (a - z))
if (t <= (-1.45d-68)) then
tmp = t_1
else if (t <= 2.2d+24) then
tmp = x * ((y / (z - a)) + 1.0d0)
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 - z) * (t / (a - z));
double tmp;
if (t <= -1.45e-68) {
tmp = t_1;
} else if (t <= 2.2e+24) {
tmp = x * ((y / (z - a)) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) * (t / (a - z)) tmp = 0 if t <= -1.45e-68: tmp = t_1 elif t <= 2.2e+24: tmp = x * ((y / (z - a)) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z))) tmp = 0.0 if (t <= -1.45e-68) tmp = t_1; elseif (t <= 2.2e+24) tmp = Float64(x * Float64(Float64(y / Float64(z - a)) + 1.0)); else tmp = t_1; 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.45e-68) tmp = t_1; elseif (t <= 2.2e+24) tmp = x * ((y / (z - a)) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-68], t$95$1, If[LessEqual[t, 2.2e+24], N[(x * N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(\frac{y}{z - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e-68 or 2.20000000000000002e24 < t Initial program 67.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6454.4%
Simplified54.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6475.2%
Applied egg-rr75.2%
if -1.45e-68 < t < 2.20000000000000002e24Initial program 73.9%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6472.3%
Applied egg-rr72.3%
Taylor expanded in y around inf
Simplified67.3%
Taylor expanded in t around 0
*-rgt-identityN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6460.6%
Simplified60.6%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e+106) t (if (<= z 9.8e+148) (* x (+ (/ y (- z a)) 1.0)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+106) {
tmp = t;
} else if (z <= 9.8e+148) {
tmp = x * ((y / (z - a)) + 1.0);
} 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 (z <= (-7.5d+106)) then
tmp = t
else if (z <= 9.8d+148) then
tmp = x * ((y / (z - a)) + 1.0d0)
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 (z <= -7.5e+106) {
tmp = t;
} else if (z <= 9.8e+148) {
tmp = x * ((y / (z - a)) + 1.0);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+106: tmp = t elif z <= 9.8e+148: tmp = x * ((y / (z - a)) + 1.0) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+106) tmp = t; elseif (z <= 9.8e+148) tmp = Float64(x * Float64(Float64(y / Float64(z - a)) + 1.0)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e+106) tmp = t; elseif (z <= 9.8e+148) tmp = x * ((y / (z - a)) + 1.0); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+106], t, If[LessEqual[z, 9.8e+148], N[(x * N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+148}:\\
\;\;\;\;x \cdot \left(\frac{y}{z - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.50000000000000058e106 or 9.8e148 < z Initial program 38.0%
Taylor expanded in z around inf
Simplified59.9%
if -7.50000000000000058e106 < z < 9.8e148Initial program 84.0%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.8%
Applied egg-rr85.8%
Taylor expanded in y around inf
Simplified73.0%
Taylor expanded in t around 0
*-rgt-identityN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6454.7%
Simplified54.7%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.5e+105) t (if (<= z 5e+153) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+105) {
tmp = t;
} else if (z <= 5e+153) {
tmp = x * (1.0 - (y / a));
} 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 (z <= (-5.5d+105)) then
tmp = t
else if (z <= 5d+153) then
tmp = x * (1.0d0 - (y / a))
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 (z <= -5.5e+105) {
tmp = t;
} else if (z <= 5e+153) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+105: tmp = t elif z <= 5e+153: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+105) tmp = t; elseif (z <= 5e+153) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+105) tmp = t; elseif (z <= 5e+153) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+105], t, If[LessEqual[z, 5e+153], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+105}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+153}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.49999999999999979e105 or 5.00000000000000018e153 < z Initial program 38.0%
Taylor expanded in z around inf
Simplified59.9%
if -5.49999999999999979e105 < z < 5.00000000000000018e153Initial program 84.0%
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.8%
Applied egg-rr85.8%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6457.4%
Simplified57.4%
Taylor expanded in t around 0
*-rgt-identityN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6446.6%
Simplified46.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -8e-12) x (if (<= a 9.4e+80) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e-12) {
tmp = x;
} else if (a <= 9.4e+80) {
tmp = t;
} 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 <= (-8d-12)) then
tmp = x
else if (a <= 9.4d+80) then
tmp = t
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 <= -8e-12) {
tmp = x;
} else if (a <= 9.4e+80) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8e-12: tmp = x elif a <= 9.4e+80: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8e-12) tmp = x; elseif (a <= 9.4e+80) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8e-12) tmp = x; elseif (a <= 9.4e+80) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8e-12], x, If[LessEqual[a, 9.4e+80], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.4 \cdot 10^{+80}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.99999999999999984e-12 or 9.40000000000000019e80 < a Initial program 79.6%
Taylor expanded in a around inf
Simplified46.7%
if -7.99999999999999984e-12 < a < 9.40000000000000019e80Initial program 64.7%
Taylor expanded in z around inf
Simplified37.4%
(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 70.7%
Taylor expanded in z around inf
Simplified26.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))