
(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 20 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) (- t x)) (- a z)))))
(if (<= t_1 -1e-280)
(fma (/ (- y z) (- a z)) (- t x) x)
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
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 (t_1 <= -1e-280) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-280) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-280], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999996e-281Initial program 74.9%
+-commutative74.9%
associate-*l/93.3%
fma-def93.3%
Simplified93.3%
if -9.9999999999999996e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in z around -inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 71.7%
+-commutative71.7%
associate-*l/91.6%
fma-def91.6%
Simplified91.6%
fma-udef91.6%
*-commutative91.6%
clear-num91.6%
un-div-inv91.9%
Applied egg-rr91.9%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -1e-280) (not (<= t_1 0.0)))
(+ x (* (- x t) (/ (- z y) (- a z))))
(- t (/ (* (- t x) (- y a)) z)))))
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 ((t_1 <= -1e-280) || !(t_1 <= 0.0)) {
tmp = x + ((x - t) * ((z - y) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-1d-280)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((x - t) * ((z - y) / (a - z)))
else
tmp = t - (((t - x) * (y - a)) / z)
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 ((t_1 <= -1e-280) || !(t_1 <= 0.0)) {
tmp = x + ((x - t) * ((z - y) / (a - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -1e-280) or not (t_1 <= 0.0): tmp = x + ((x - t) * ((z - y) / (a - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -1e-280) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); 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 ((t_1 <= -1e-280) || ~((t_1 <= 0.0))) tmp = x + ((x - t) * ((z - y) / (a - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-280], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999996e-281 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 73.4%
associate-*l/92.5%
Simplified92.5%
if -9.9999999999999996e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in z around -inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_1 -1e-280)
(+ x (* (- x t) (/ (- z y) (- a z))))
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
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 (t_1 <= -1e-280) {
tmp = x + ((x - t) * ((z - y) / (a - z)));
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if (t_1 <= (-1d-280)) then
tmp = x + ((x - t) * ((z - y) / (a - z)))
else if (t_1 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else
tmp = x + ((t - x) / ((a - z) / (y - z)))
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 (t_1 <= -1e-280) {
tmp = x + ((x - t) * ((z - y) / (a - z)));
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_1 <= -1e-280: tmp = x + ((x - t) * ((z - y) / (a - z))) elif t_1 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) else: tmp = x + ((t - x) / ((a - z) / (y - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_1 <= -1e-280) tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / Float64(a - z)))); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); 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 (t_1 <= -1e-280) tmp = x + ((x - t) * ((z - y) / (a - z))); elseif (t_1 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); else tmp = x + ((t - x) / ((a - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-280], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-280}:\\
\;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a - z}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -9.9999999999999996e-281Initial program 74.9%
associate-*l/93.3%
Simplified93.3%
if -9.9999999999999996e-281 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.9%
associate-*l/4.9%
Simplified4.9%
Taylor expanded in z around -inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 71.7%
+-commutative71.7%
associate-*l/91.6%
fma-def91.6%
Simplified91.6%
fma-udef91.6%
*-commutative91.6%
clear-num91.6%
un-div-inv91.9%
Applied egg-rr91.9%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* t (- z y)) z)))
(if (<= a -9.8e+19)
(+ x (/ (* y t) a))
(if (<= a -9.2e-113)
t
(if (<= a -1.35e-200)
(* (- y a) (/ x z))
(if (<= a 4.6e-175)
t_1
(if (<= a 4.5e-162)
(/ (- y) (/ (- a z) x))
(if (<= a 1.32e-70)
(/ (* y t) (- a z))
(if (<= a 5.5e-22) t_1 (+ x (/ y (/ a t))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t * (z - y)) / z;
double tmp;
if (a <= -9.8e+19) {
tmp = x + ((y * t) / a);
} else if (a <= -9.2e-113) {
tmp = t;
} else if (a <= -1.35e-200) {
tmp = (y - a) * (x / z);
} else if (a <= 4.6e-175) {
tmp = t_1;
} else if (a <= 4.5e-162) {
tmp = -y / ((a - z) / x);
} else if (a <= 1.32e-70) {
tmp = (y * t) / (a - z);
} else if (a <= 5.5e-22) {
tmp = t_1;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (t * (z - y)) / z
if (a <= (-9.8d+19)) then
tmp = x + ((y * t) / a)
else if (a <= (-9.2d-113)) then
tmp = t
else if (a <= (-1.35d-200)) then
tmp = (y - a) * (x / z)
else if (a <= 4.6d-175) then
tmp = t_1
else if (a <= 4.5d-162) then
tmp = -y / ((a - z) / x)
else if (a <= 1.32d-70) then
tmp = (y * t) / (a - z)
else if (a <= 5.5d-22) then
tmp = t_1
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t * (z - y)) / z;
double tmp;
if (a <= -9.8e+19) {
tmp = x + ((y * t) / a);
} else if (a <= -9.2e-113) {
tmp = t;
} else if (a <= -1.35e-200) {
tmp = (y - a) * (x / z);
} else if (a <= 4.6e-175) {
tmp = t_1;
} else if (a <= 4.5e-162) {
tmp = -y / ((a - z) / x);
} else if (a <= 1.32e-70) {
tmp = (y * t) / (a - z);
} else if (a <= 5.5e-22) {
tmp = t_1;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t * (z - y)) / z tmp = 0 if a <= -9.8e+19: tmp = x + ((y * t) / a) elif a <= -9.2e-113: tmp = t elif a <= -1.35e-200: tmp = (y - a) * (x / z) elif a <= 4.6e-175: tmp = t_1 elif a <= 4.5e-162: tmp = -y / ((a - z) / x) elif a <= 1.32e-70: tmp = (y * t) / (a - z) elif a <= 5.5e-22: tmp = t_1 else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t * Float64(z - y)) / z) tmp = 0.0 if (a <= -9.8e+19) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (a <= -9.2e-113) tmp = t; elseif (a <= -1.35e-200) tmp = Float64(Float64(y - a) * Float64(x / z)); elseif (a <= 4.6e-175) tmp = t_1; elseif (a <= 4.5e-162) tmp = Float64(Float64(-y) / Float64(Float64(a - z) / x)); elseif (a <= 1.32e-70) tmp = Float64(Float64(y * t) / Float64(a - z)); elseif (a <= 5.5e-22) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t * (z - y)) / z; tmp = 0.0; if (a <= -9.8e+19) tmp = x + ((y * t) / a); elseif (a <= -9.2e-113) tmp = t; elseif (a <= -1.35e-200) tmp = (y - a) * (x / z); elseif (a <= 4.6e-175) tmp = t_1; elseif (a <= 4.5e-162) tmp = -y / ((a - z) / x); elseif (a <= 1.32e-70) tmp = (y * t) / (a - z); elseif (a <= 5.5e-22) tmp = t_1; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[a, -9.8e+19], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9.2e-113], t, If[LessEqual[a, -1.35e-200], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e-175], t$95$1, If[LessEqual[a, 4.5e-162], N[((-y) / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.32e-70], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-22], t$95$1, N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(z - y\right)}{z}\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-113}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-200}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-y}{\frac{a - z}{x}}\\
\mathbf{elif}\;a \leq 1.32 \cdot 10^{-70}:\\
\;\;\;\;\frac{y \cdot t}{a - z}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if a < -9.8e19Initial program 65.9%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around inf 67.5%
if -9.8e19 < a < -9.20000000000000032e-113Initial program 63.2%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in z around inf 55.1%
if -9.20000000000000032e-113 < a < -1.3500000000000001e-200Initial program 81.5%
associate-*l/85.1%
Simplified85.1%
Taylor expanded in x around inf 56.9%
mul-1-neg56.9%
unsub-neg56.9%
Simplified56.9%
Taylor expanded in z around inf 49.5%
associate-*r/49.5%
neg-mul-149.5%
+-commutative49.5%
distribute-lft-in49.5%
neg-mul-149.5%
remove-double-neg49.5%
neg-mul-149.5%
sub-neg49.5%
Simplified49.5%
*-commutative49.5%
clear-num49.5%
un-div-inv49.5%
Applied egg-rr49.5%
associate-/r/53.7%
Simplified53.7%
if -1.3500000000000001e-200 < a < 4.6e-175 or 1.3200000000000001e-70 < a < 5.5000000000000001e-22Initial program 60.3%
associate-*l/76.8%
Simplified76.8%
Taylor expanded in x around 0 53.9%
Taylor expanded in a around 0 52.5%
mul-1-neg52.5%
Simplified52.5%
if 4.6e-175 < a < 4.50000000000000023e-162Initial program 50.9%
associate-*l/51.5%
Simplified51.5%
Taylor expanded in x around inf 51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
Taylor expanded in y around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
associate-/l*100.0%
Simplified100.0%
if 4.50000000000000023e-162 < a < 1.3200000000000001e-70Initial program 84.6%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around 0 65.2%
Taylor expanded in y around inf 52.7%
if 5.5000000000000001e-22 < a Initial program 72.8%
associate-*l/88.8%
Simplified88.8%
Taylor expanded in z around 0 69.6%
Taylor expanded in t around inf 57.0%
associate-/l*63.3%
Simplified63.3%
Final simplification59.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) a))))
(if (<= a -5.1e+113)
x
(if (<= a -9.2e+21)
t_1
(if (<= a -1.2e-113)
t
(if (<= a -3.4e-304)
(/ y (/ z x))
(if (<= a 2.05e-177) t (if (<= a 3.1e+31) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (a <= -5.1e+113) {
tmp = x;
} else if (a <= -9.2e+21) {
tmp = t_1;
} else if (a <= -1.2e-113) {
tmp = t;
} else if (a <= -3.4e-304) {
tmp = y / (z / x);
} else if (a <= 2.05e-177) {
tmp = t;
} else if (a <= 3.1e+31) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / a)
if (a <= (-5.1d+113)) then
tmp = x
else if (a <= (-9.2d+21)) then
tmp = t_1
else if (a <= (-1.2d-113)) then
tmp = t
else if (a <= (-3.4d-304)) then
tmp = y / (z / x)
else if (a <= 2.05d-177) then
tmp = t
else if (a <= 3.1d+31) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (a <= -5.1e+113) {
tmp = x;
} else if (a <= -9.2e+21) {
tmp = t_1;
} else if (a <= -1.2e-113) {
tmp = t;
} else if (a <= -3.4e-304) {
tmp = y / (z / x);
} else if (a <= 2.05e-177) {
tmp = t;
} else if (a <= 3.1e+31) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if a <= -5.1e+113: tmp = x elif a <= -9.2e+21: tmp = t_1 elif a <= -1.2e-113: tmp = t elif a <= -3.4e-304: tmp = y / (z / x) elif a <= 2.05e-177: tmp = t elif a <= 3.1e+31: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (a <= -5.1e+113) tmp = x; elseif (a <= -9.2e+21) tmp = t_1; elseif (a <= -1.2e-113) tmp = t; elseif (a <= -3.4e-304) tmp = Float64(y / Float64(z / x)); elseif (a <= 2.05e-177) tmp = t; elseif (a <= 3.1e+31) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (a <= -5.1e+113) tmp = x; elseif (a <= -9.2e+21) tmp = t_1; elseif (a <= -1.2e-113) tmp = t; elseif (a <= -3.4e-304) tmp = y / (z / x); elseif (a <= 2.05e-177) tmp = t; elseif (a <= 3.1e+31) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+113], x, If[LessEqual[a, -9.2e+21], t$95$1, If[LessEqual[a, -1.2e-113], t, If[LessEqual[a, -3.4e-304], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.05e-177], t, If[LessEqual[a, 3.1e+31], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-113}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-304}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-177}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.09999999999999994e113 or 3.1000000000000002e31 < a Initial program 69.0%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in a around inf 57.3%
if -5.09999999999999994e113 < a < -9.2e21 or 2.05e-177 < a < 3.1000000000000002e31Initial program 74.8%
associate-*l/87.1%
Simplified87.1%
Taylor expanded in z around 0 49.2%
Taylor expanded in y around inf 41.1%
div-sub41.1%
*-commutative41.1%
Simplified41.1%
if -9.2e21 < a < -1.20000000000000006e-113 or -3.3999999999999999e-304 < a < 2.05e-177Initial program 56.3%
associate-*l/77.0%
Simplified77.0%
Taylor expanded in z around inf 54.4%
if -1.20000000000000006e-113 < a < -3.3999999999999999e-304Initial program 73.7%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in x around inf 46.2%
mul-1-neg46.2%
unsub-neg46.2%
Simplified46.2%
Taylor expanded in a around 0 41.3%
associate-/l*44.8%
Simplified44.8%
Final simplification50.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.8e+18)
(+ x (/ (* y t) a))
(if (<= a -4.1e-114)
t
(if (<= a -1.85e-305)
(* (- y a) (/ x z))
(if (<= a 1.95e-181)
t
(if (<= a 7.6e-157)
(/ (- y) (/ (- a z) x))
(if (<= a 3e-8) (/ (* y t) (- a z)) (+ x (/ y (/ a t))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e+18) {
tmp = x + ((y * t) / a);
} else if (a <= -4.1e-114) {
tmp = t;
} else if (a <= -1.85e-305) {
tmp = (y - a) * (x / z);
} else if (a <= 1.95e-181) {
tmp = t;
} else if (a <= 7.6e-157) {
tmp = -y / ((a - z) / x);
} else if (a <= 3e-8) {
tmp = (y * t) / (a - z);
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.8d+18)) then
tmp = x + ((y * t) / a)
else if (a <= (-4.1d-114)) then
tmp = t
else if (a <= (-1.85d-305)) then
tmp = (y - a) * (x / z)
else if (a <= 1.95d-181) then
tmp = t
else if (a <= 7.6d-157) then
tmp = -y / ((a - z) / x)
else if (a <= 3d-8) then
tmp = (y * t) / (a - z)
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e+18) {
tmp = x + ((y * t) / a);
} else if (a <= -4.1e-114) {
tmp = t;
} else if (a <= -1.85e-305) {
tmp = (y - a) * (x / z);
} else if (a <= 1.95e-181) {
tmp = t;
} else if (a <= 7.6e-157) {
tmp = -y / ((a - z) / x);
} else if (a <= 3e-8) {
tmp = (y * t) / (a - z);
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e+18: tmp = x + ((y * t) / a) elif a <= -4.1e-114: tmp = t elif a <= -1.85e-305: tmp = (y - a) * (x / z) elif a <= 1.95e-181: tmp = t elif a <= 7.6e-157: tmp = -y / ((a - z) / x) elif a <= 3e-8: tmp = (y * t) / (a - z) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e+18) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (a <= -4.1e-114) tmp = t; elseif (a <= -1.85e-305) tmp = Float64(Float64(y - a) * Float64(x / z)); elseif (a <= 1.95e-181) tmp = t; elseif (a <= 7.6e-157) tmp = Float64(Float64(-y) / Float64(Float64(a - z) / x)); elseif (a <= 3e-8) tmp = Float64(Float64(y * t) / Float64(a - z)); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.8e+18) tmp = x + ((y * t) / a); elseif (a <= -4.1e-114) tmp = t; elseif (a <= -1.85e-305) tmp = (y - a) * (x / z); elseif (a <= 1.95e-181) tmp = t; elseif (a <= 7.6e-157) tmp = -y / ((a - z) / x); elseif (a <= 3e-8) tmp = (y * t) / (a - z); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e+18], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.1e-114], t, If[LessEqual[a, -1.85e-305], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-181], t, If[LessEqual[a, 7.6e-157], N[((-y) / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3e-8], N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+18}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq -4.1 \cdot 10^{-114}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-181}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{-157}:\\
\;\;\;\;\frac{-y}{\frac{a - z}{x}}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-8}:\\
\;\;\;\;\frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if a < -4.8e18Initial program 65.9%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around inf 67.5%
if -4.8e18 < a < -4.0999999999999997e-114 or -1.84999999999999989e-305 < a < 1.95e-181Initial program 54.5%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in z around inf 54.5%
if -4.0999999999999997e-114 < a < -1.84999999999999989e-305Initial program 73.7%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in x around inf 46.2%
mul-1-neg46.2%
unsub-neg46.2%
Simplified46.2%
Taylor expanded in z around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
+-commutative45.8%
distribute-lft-in45.8%
neg-mul-145.8%
remove-double-neg45.8%
neg-mul-145.8%
sub-neg45.8%
Simplified45.8%
*-commutative45.8%
clear-num45.8%
un-div-inv45.9%
Applied egg-rr45.9%
associate-/r/48.1%
Simplified48.1%
if 1.95e-181 < a < 7.60000000000000041e-157Initial program 58.6%
associate-*l/72.3%
Simplified72.3%
Taylor expanded in x around inf 44.4%
mul-1-neg44.4%
unsub-neg44.4%
Simplified44.4%
Taylor expanded in y around inf 72.4%
associate-*r/72.4%
neg-mul-172.4%
Simplified72.4%
Taylor expanded in y around 0 72.4%
mul-1-neg72.4%
associate-/l*72.3%
Simplified72.3%
if 7.60000000000000041e-157 < a < 2.99999999999999973e-8Initial program 81.5%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in x around 0 67.7%
Taylor expanded in y around inf 48.2%
if 2.99999999999999973e-8 < a Initial program 72.6%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in z around 0 70.9%
Taylor expanded in t around inf 57.4%
associate-/l*64.1%
Simplified64.1%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))))
(if (<= a -7.2e+18)
t_1
(if (<= a 9.5e-144)
(- t (/ y (/ z (- t x))))
(if (<= a 40000000000.0)
(* t (/ (- y z) (- a z)))
(if (<= a 6.5e+37) (/ x (/ z (- y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double tmp;
if (a <= -7.2e+18) {
tmp = t_1;
} else if (a <= 9.5e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 40000000000.0) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 6.5e+37) {
tmp = x / (z / (y - a));
} 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 + ((t - x) * (y / a))
if (a <= (-7.2d+18)) then
tmp = t_1
else if (a <= 9.5d-144) then
tmp = t - (y / (z / (t - x)))
else if (a <= 40000000000.0d0) then
tmp = t * ((y - z) / (a - z))
else if (a <= 6.5d+37) then
tmp = x / (z / (y - a))
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 / a));
double tmp;
if (a <= -7.2e+18) {
tmp = t_1;
} else if (a <= 9.5e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 40000000000.0) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 6.5e+37) {
tmp = x / (z / (y - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) tmp = 0 if a <= -7.2e+18: tmp = t_1 elif a <= 9.5e-144: tmp = t - (y / (z / (t - x))) elif a <= 40000000000.0: tmp = t * ((y - z) / (a - z)) elif a <= 6.5e+37: tmp = x / (z / (y - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) tmp = 0.0 if (a <= -7.2e+18) tmp = t_1; elseif (a <= 9.5e-144) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); elseif (a <= 40000000000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 6.5e+37) tmp = Float64(x / Float64(z / Float64(y - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); tmp = 0.0; if (a <= -7.2e+18) tmp = t_1; elseif (a <= 9.5e-144) tmp = t - (y / (z / (t - x))); elseif (a <= 40000000000.0) tmp = t * ((y - z) / (a - z)); elseif (a <= 6.5e+37) tmp = x / (z / (y - a)); 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[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e+18], t$95$1, If[LessEqual[a, 9.5e-144], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 40000000000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+37], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-144}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{elif}\;a \leq 40000000000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+37}:\\
\;\;\;\;\frac{x}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -7.2e18 or 6.4999999999999998e37 < a Initial program 69.2%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 78.9%
if -7.2e18 < a < 9.49999999999999953e-144Initial program 63.1%
associate-*l/78.2%
Simplified78.2%
Taylor expanded in z around -inf 76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
distribute-rgt-out--76.7%
Simplified76.7%
Taylor expanded in y around inf 73.8%
associate-/l*79.4%
Simplified79.4%
if 9.49999999999999953e-144 < a < 4e10Initial program 83.7%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in x around 0 65.4%
associate-*r/69.8%
Simplified69.8%
if 4e10 < a < 6.4999999999999998e37Initial program 52.0%
associate-*l/51.6%
Simplified51.6%
Taylor expanded in x around inf 19.3%
mul-1-neg19.3%
unsub-neg19.3%
Simplified19.3%
Taylor expanded in z around inf 67.4%
associate-*r/67.4%
neg-mul-167.4%
+-commutative67.4%
distribute-lft-in67.4%
neg-mul-167.4%
remove-double-neg67.4%
neg-mul-167.4%
sub-neg67.4%
Simplified67.4%
*-commutative67.4%
clear-num67.4%
un-div-inv67.6%
Applied egg-rr67.6%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))))
(if (<= a -9.8e+23)
t_1
(if (<= a 5.8e-144)
(- t (/ y (/ z (- t x))))
(if (<= a 195000000000.0)
(/ t (/ (- a z) (- y z)))
(if (<= a 1.85e+37) (/ x (/ z (- y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double tmp;
if (a <= -9.8e+23) {
tmp = t_1;
} else if (a <= 5.8e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 195000000000.0) {
tmp = t / ((a - z) / (y - z));
} else if (a <= 1.85e+37) {
tmp = x / (z / (y - a));
} 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 + ((t - x) * (y / a))
if (a <= (-9.8d+23)) then
tmp = t_1
else if (a <= 5.8d-144) then
tmp = t - (y / (z / (t - x)))
else if (a <= 195000000000.0d0) then
tmp = t / ((a - z) / (y - z))
else if (a <= 1.85d+37) then
tmp = x / (z / (y - a))
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 / a));
double tmp;
if (a <= -9.8e+23) {
tmp = t_1;
} else if (a <= 5.8e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 195000000000.0) {
tmp = t / ((a - z) / (y - z));
} else if (a <= 1.85e+37) {
tmp = x / (z / (y - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) tmp = 0 if a <= -9.8e+23: tmp = t_1 elif a <= 5.8e-144: tmp = t - (y / (z / (t - x))) elif a <= 195000000000.0: tmp = t / ((a - z) / (y - z)) elif a <= 1.85e+37: tmp = x / (z / (y - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) tmp = 0.0 if (a <= -9.8e+23) tmp = t_1; elseif (a <= 5.8e-144) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); elseif (a <= 195000000000.0) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif (a <= 1.85e+37) tmp = Float64(x / Float64(z / Float64(y - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); tmp = 0.0; if (a <= -9.8e+23) tmp = t_1; elseif (a <= 5.8e-144) tmp = t - (y / (z / (t - x))); elseif (a <= 195000000000.0) tmp = t / ((a - z) / (y - z)); elseif (a <= 1.85e+37) tmp = x / (z / (y - a)); 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[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+23], t$95$1, If[LessEqual[a, 5.8e-144], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 195000000000.0], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+37], N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-144}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{elif}\;a \leq 195000000000:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+37}:\\
\;\;\;\;\frac{x}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -9.8000000000000006e23 or 1.85e37 < a Initial program 69.2%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 78.9%
if -9.8000000000000006e23 < a < 5.8000000000000004e-144Initial program 63.1%
associate-*l/78.2%
Simplified78.2%
Taylor expanded in z around -inf 76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
distribute-rgt-out--76.7%
Simplified76.7%
Taylor expanded in y around inf 73.8%
associate-/l*79.4%
Simplified79.4%
if 5.8000000000000004e-144 < a < 1.95e11Initial program 83.7%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in x around 0 65.4%
expm1-log1p-u32.6%
expm1-udef21.1%
associate-/l*24.9%
Applied egg-rr24.9%
expm1-def36.5%
expm1-log1p69.9%
Simplified69.9%
if 1.95e11 < a < 1.85e37Initial program 52.0%
associate-*l/51.6%
Simplified51.6%
Taylor expanded in x around inf 19.3%
mul-1-neg19.3%
unsub-neg19.3%
Simplified19.3%
Taylor expanded in z around inf 67.4%
associate-*r/67.4%
neg-mul-167.4%
+-commutative67.4%
distribute-lft-in67.4%
neg-mul-167.4%
remove-double-neg67.4%
neg-mul-167.4%
sub-neg67.4%
Simplified67.4%
*-commutative67.4%
clear-num67.4%
un-div-inv67.6%
Applied egg-rr67.6%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))))
(if (<= a -1.46e+23)
t_1
(if (<= a 9.5e-144)
(- t (/ y (/ z (- t x))))
(if (<= a 155000000000.0)
(/ t (/ (- a z) (- y z)))
(if (<= a 1.7e+60) (+ t (/ (- y a) (/ z x))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double tmp;
if (a <= -1.46e+23) {
tmp = t_1;
} else if (a <= 9.5e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 155000000000.0) {
tmp = t / ((a - z) / (y - z));
} else if (a <= 1.7e+60) {
tmp = t + ((y - a) / (z / 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 = x + ((t - x) * (y / a))
if (a <= (-1.46d+23)) then
tmp = t_1
else if (a <= 9.5d-144) then
tmp = t - (y / (z / (t - x)))
else if (a <= 155000000000.0d0) then
tmp = t / ((a - z) / (y - z))
else if (a <= 1.7d+60) then
tmp = t + ((y - a) / (z / 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 = x + ((t - x) * (y / a));
double tmp;
if (a <= -1.46e+23) {
tmp = t_1;
} else if (a <= 9.5e-144) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 155000000000.0) {
tmp = t / ((a - z) / (y - z));
} else if (a <= 1.7e+60) {
tmp = t + ((y - a) / (z / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) tmp = 0 if a <= -1.46e+23: tmp = t_1 elif a <= 9.5e-144: tmp = t - (y / (z / (t - x))) elif a <= 155000000000.0: tmp = t / ((a - z) / (y - z)) elif a <= 1.7e+60: tmp = t + ((y - a) / (z / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) tmp = 0.0 if (a <= -1.46e+23) tmp = t_1; elseif (a <= 9.5e-144) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); elseif (a <= 155000000000.0) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif (a <= 1.7e+60) tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); tmp = 0.0; if (a <= -1.46e+23) tmp = t_1; elseif (a <= 9.5e-144) tmp = t - (y / (z / (t - x))); elseif (a <= 155000000000.0) tmp = t / ((a - z) / (y - z)); elseif (a <= 1.7e+60) tmp = t + ((y - a) / (z / x)); 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[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.46e+23], t$95$1, If[LessEqual[a, 9.5e-144], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 155000000000.0], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+60], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.46 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-144}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{elif}\;a \leq 155000000000:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+60}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.45999999999999996e23 or 1.7e60 < a Initial program 69.5%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in z around 0 79.5%
if -1.45999999999999996e23 < a < 9.49999999999999953e-144Initial program 63.1%
associate-*l/78.2%
Simplified78.2%
Taylor expanded in z around -inf 76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
distribute-rgt-out--76.7%
Simplified76.7%
Taylor expanded in y around inf 73.8%
associate-/l*79.4%
Simplified79.4%
if 9.49999999999999953e-144 < a < 1.55e11Initial program 83.7%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in x around 0 65.4%
expm1-log1p-u32.6%
expm1-udef21.1%
associate-/l*24.9%
Applied egg-rr24.9%
expm1-def36.5%
expm1-log1p69.9%
Simplified69.9%
if 1.55e11 < a < 1.7e60Initial program 52.2%
associate-*l/63.7%
Simplified63.7%
Taylor expanded in z around -inf 87.7%
+-commutative87.7%
mul-1-neg87.7%
unsub-neg87.7%
distribute-rgt-out--87.7%
Simplified87.7%
Taylor expanded in t around 0 75.2%
mul-1-neg75.2%
associate-/l*75.0%
Simplified75.0%
Final simplification77.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ z (- y z)))))
(if (<= a -3.2e+24)
(+ x (/ (* y t) a))
(if (<= a -2e-115)
t_1
(if (<= a -6.8e-195)
(* (- y a) (/ x z))
(if (<= a 8.5e-23) t_1 (+ x (/ y (/ a t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double tmp;
if (a <= -3.2e+24) {
tmp = x + ((y * t) / a);
} else if (a <= -2e-115) {
tmp = t_1;
} else if (a <= -6.8e-195) {
tmp = (y - a) * (x / z);
} else if (a <= 8.5e-23) {
tmp = t_1;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -t / (z / (y - z))
if (a <= (-3.2d+24)) then
tmp = x + ((y * t) / a)
else if (a <= (-2d-115)) then
tmp = t_1
else if (a <= (-6.8d-195)) then
tmp = (y - a) * (x / z)
else if (a <= 8.5d-23) then
tmp = t_1
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / (z / (y - z));
double tmp;
if (a <= -3.2e+24) {
tmp = x + ((y * t) / a);
} else if (a <= -2e-115) {
tmp = t_1;
} else if (a <= -6.8e-195) {
tmp = (y - a) * (x / z);
} else if (a <= 8.5e-23) {
tmp = t_1;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / (z / (y - z)) tmp = 0 if a <= -3.2e+24: tmp = x + ((y * t) / a) elif a <= -2e-115: tmp = t_1 elif a <= -6.8e-195: tmp = (y - a) * (x / z) elif a <= 8.5e-23: tmp = t_1 else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(z / Float64(y - z))) tmp = 0.0 if (a <= -3.2e+24) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (a <= -2e-115) tmp = t_1; elseif (a <= -6.8e-195) tmp = Float64(Float64(y - a) * Float64(x / z)); elseif (a <= 8.5e-23) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / (z / (y - z)); tmp = 0.0; if (a <= -3.2e+24) tmp = x + ((y * t) / a); elseif (a <= -2e-115) tmp = t_1; elseif (a <= -6.8e-195) tmp = (y - a) * (x / z); elseif (a <= 8.5e-23) tmp = t_1; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e+24], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2e-115], t$95$1, If[LessEqual[a, -6.8e-195], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-23], t$95$1, N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{z}{y - z}}\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-115}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-195}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if a < -3.1999999999999997e24Initial program 65.9%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around inf 67.5%
if -3.1999999999999997e24 < a < -2.0000000000000001e-115 or -6.80000000000000003e-195 < a < 8.4999999999999996e-23Initial program 65.9%
associate-*l/81.0%
Simplified81.0%
Taylor expanded in x around 0 53.8%
Taylor expanded in a around 0 46.8%
mul-1-neg46.8%
associate-/l*59.3%
distribute-neg-frac59.3%
Simplified59.3%
if -2.0000000000000001e-115 < a < -6.80000000000000003e-195Initial program 81.5%
associate-*l/85.1%
Simplified85.1%
Taylor expanded in x around inf 56.9%
mul-1-neg56.9%
unsub-neg56.9%
Simplified56.9%
Taylor expanded in z around inf 49.5%
associate-*r/49.5%
neg-mul-149.5%
+-commutative49.5%
distribute-lft-in49.5%
neg-mul-149.5%
remove-double-neg49.5%
neg-mul-149.5%
sub-neg49.5%
Simplified49.5%
*-commutative49.5%
clear-num49.5%
un-div-inv49.5%
Applied egg-rr49.5%
associate-/r/53.7%
Simplified53.7%
if 8.4999999999999996e-23 < a Initial program 72.8%
associate-*l/88.8%
Simplified88.8%
Taylor expanded in z around 0 69.6%
Taylor expanded in t around inf 57.0%
associate-/l*63.3%
Simplified63.3%
Final simplification61.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.4e-8)
t
(if (<= z -4.2e-228)
x
(if (<= z -3.4e-279)
(/ y (/ a t))
(if (<= z 4.2e-146)
x
(if (<= z 2.2e-60) (* x (/ y z)) (if (<= z 2.5e+130) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e-8) {
tmp = t;
} else if (z <= -4.2e-228) {
tmp = x;
} else if (z <= -3.4e-279) {
tmp = y / (a / t);
} else if (z <= 4.2e-146) {
tmp = x;
} else if (z <= 2.2e-60) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.4d-8)) then
tmp = t
else if (z <= (-4.2d-228)) then
tmp = x
else if (z <= (-3.4d-279)) then
tmp = y / (a / t)
else if (z <= 4.2d-146) then
tmp = x
else if (z <= 2.2d-60) then
tmp = x * (y / z)
else if (z <= 2.5d+130) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e-8) {
tmp = t;
} else if (z <= -4.2e-228) {
tmp = x;
} else if (z <= -3.4e-279) {
tmp = y / (a / t);
} else if (z <= 4.2e-146) {
tmp = x;
} else if (z <= 2.2e-60) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.4e-8: tmp = t elif z <= -4.2e-228: tmp = x elif z <= -3.4e-279: tmp = y / (a / t) elif z <= 4.2e-146: tmp = x elif z <= 2.2e-60: tmp = x * (y / z) elif z <= 2.5e+130: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.4e-8) tmp = t; elseif (z <= -4.2e-228) tmp = x; elseif (z <= -3.4e-279) tmp = Float64(y / Float64(a / t)); elseif (z <= 4.2e-146) tmp = x; elseif (z <= 2.2e-60) tmp = Float64(x * Float64(y / z)); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.4e-8) tmp = t; elseif (z <= -4.2e-228) tmp = x; elseif (z <= -3.4e-279) tmp = y / (a / t); elseif (z <= 4.2e-146) tmp = x; elseif (z <= 2.2e-60) tmp = x * (y / z); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e-8], t, If[LessEqual[z, -4.2e-228], x, If[LessEqual[z, -3.4e-279], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-146], x, If[LessEqual[z, 2.2e-60], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+130], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-8}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-228}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-279}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-146}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-60}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.3999999999999997e-8 or 2.4999999999999998e130 < z Initial program 41.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
if -4.3999999999999997e-8 < z < -4.19999999999999982e-228 or -3.40000000000000015e-279 < z < 4.1999999999999998e-146 or 2.1999999999999999e-60 < z < 2.4999999999999998e130Initial program 84.1%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in a around inf 42.0%
if -4.19999999999999982e-228 < z < -3.40000000000000015e-279Initial program 78.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 78.5%
Taylor expanded in z around 0 78.5%
associate-/l*67.9%
Simplified67.9%
if 4.1999999999999998e-146 < z < 2.1999999999999999e-60Initial program 99.8%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
Taylor expanded in a around 0 46.4%
Final simplification44.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.03)
t
(if (<= z -1e-228)
x
(if (<= z -3e-281)
(/ (* y t) a)
(if (<= z 4.6e-146)
x
(if (<= z 2.7e-65) (* x (/ y z)) (if (<= z 2.5e+130) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.03) {
tmp = t;
} else if (z <= -1e-228) {
tmp = x;
} else if (z <= -3e-281) {
tmp = (y * t) / a;
} else if (z <= 4.6e-146) {
tmp = x;
} else if (z <= 2.7e-65) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-0.03d0)) then
tmp = t
else if (z <= (-1d-228)) then
tmp = x
else if (z <= (-3d-281)) then
tmp = (y * t) / a
else if (z <= 4.6d-146) then
tmp = x
else if (z <= 2.7d-65) then
tmp = x * (y / z)
else if (z <= 2.5d+130) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.03) {
tmp = t;
} else if (z <= -1e-228) {
tmp = x;
} else if (z <= -3e-281) {
tmp = (y * t) / a;
} else if (z <= 4.6e-146) {
tmp = x;
} else if (z <= 2.7e-65) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.03: tmp = t elif z <= -1e-228: tmp = x elif z <= -3e-281: tmp = (y * t) / a elif z <= 4.6e-146: tmp = x elif z <= 2.7e-65: tmp = x * (y / z) elif z <= 2.5e+130: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.03) tmp = t; elseif (z <= -1e-228) tmp = x; elseif (z <= -3e-281) tmp = Float64(Float64(y * t) / a); elseif (z <= 4.6e-146) tmp = x; elseif (z <= 2.7e-65) tmp = Float64(x * Float64(y / z)); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.03) tmp = t; elseif (z <= -1e-228) tmp = x; elseif (z <= -3e-281) tmp = (y * t) / a; elseif (z <= 4.6e-146) tmp = x; elseif (z <= 2.7e-65) tmp = x * (y / z); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.03], t, If[LessEqual[z, -1e-228], x, If[LessEqual[z, -3e-281], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 4.6e-146], x, If[LessEqual[z, 2.7e-65], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+130], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-228}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-281}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-146}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-65}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -0.029999999999999999 or 2.4999999999999998e130 < z Initial program 41.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
if -0.029999999999999999 < z < -1.00000000000000003e-228 or -2.99999999999999975e-281 < z < 4.6000000000000001e-146 or 2.6999999999999999e-65 < z < 2.4999999999999998e130Initial program 84.1%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in a around inf 42.0%
if -1.00000000000000003e-228 < z < -2.99999999999999975e-281Initial program 78.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 78.5%
Taylor expanded in z around 0 78.5%
if 4.6000000000000001e-146 < z < 2.6999999999999999e-65Initial program 99.8%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
Taylor expanded in a around 0 46.4%
Final simplification45.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -0.4)
t
(if (<= z -2.7e-229)
t_1
(if (<= z -1.12e-277) (/ (* y t) a) (if (<= z 4e+130) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -0.4) {
tmp = t;
} else if (z <= -2.7e-229) {
tmp = t_1;
} else if (z <= -1.12e-277) {
tmp = (y * t) / a;
} else if (z <= 4e+130) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-0.4d0)) then
tmp = t
else if (z <= (-2.7d-229)) then
tmp = t_1
else if (z <= (-1.12d-277)) then
tmp = (y * t) / a
else if (z <= 4d+130) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -0.4) {
tmp = t;
} else if (z <= -2.7e-229) {
tmp = t_1;
} else if (z <= -1.12e-277) {
tmp = (y * t) / a;
} else if (z <= 4e+130) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -0.4: tmp = t elif z <= -2.7e-229: tmp = t_1 elif z <= -1.12e-277: tmp = (y * t) / a elif z <= 4e+130: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -0.4) tmp = t; elseif (z <= -2.7e-229) tmp = t_1; elseif (z <= -1.12e-277) tmp = Float64(Float64(y * t) / a); elseif (z <= 4e+130) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -0.4) tmp = t; elseif (z <= -2.7e-229) tmp = t_1; elseif (z <= -1.12e-277) tmp = (y * t) / a; elseif (z <= 4e+130) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.4], t, If[LessEqual[z, -2.7e-229], t$95$1, If[LessEqual[z, -1.12e-277], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 4e+130], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -0.4:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-229}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-277}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+130}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -0.40000000000000002 or 4.0000000000000002e130 < z Initial program 41.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
if -0.40000000000000002 < z < -2.6999999999999998e-229 or -1.12000000000000003e-277 < z < 4.0000000000000002e130Initial program 86.2%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in x around inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
Taylor expanded in z around 0 54.7%
if -2.6999999999999998e-229 < z < -1.12000000000000003e-277Initial program 78.3%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 78.5%
Taylor expanded in z around 0 78.5%
Final simplification52.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8)
(- t (/ y (/ z (- t x))))
(if (<= z 9e+106)
(+ x (/ (- t x) (/ (- a z) y)))
(+ t (/ (- y a) (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8) {
tmp = t - (y / (z / (t - x)));
} else if (z <= 9e+106) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.8d0)) then
tmp = t - (y / (z / (t - x)))
else if (z <= 9d+106) then
tmp = x + ((t - x) / ((a - z) / y))
else
tmp = t + ((y - a) / (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8) {
tmp = t - (y / (z / (t - x)));
} else if (z <= 9e+106) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8: tmp = t - (y / (z / (t - x))) elif z <= 9e+106: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t + ((y - a) / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); elseif (z <= 9e+106) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8) tmp = t - (y / (z / (t - x))); elseif (z <= 9e+106) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t + ((y - a) / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+106], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+106}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -2.7999999999999998Initial program 47.9%
associate-*l/73.3%
Simplified73.3%
Taylor expanded in z around -inf 65.8%
+-commutative65.8%
mul-1-neg65.8%
unsub-neg65.8%
distribute-rgt-out--65.8%
Simplified65.8%
Taylor expanded in y around inf 64.6%
associate-/l*72.4%
Simplified72.4%
if -2.7999999999999998 < z < 8.9999999999999994e106Initial program 87.7%
+-commutative87.7%
associate-*l/96.2%
fma-def96.2%
Simplified96.2%
fma-udef96.2%
*-commutative96.2%
clear-num95.8%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around inf 85.3%
if 8.9999999999999994e106 < z Initial program 29.9%
associate-*l/71.6%
Simplified71.6%
Taylor expanded in z around -inf 69.8%
+-commutative69.8%
mul-1-neg69.8%
unsub-neg69.8%
distribute-rgt-out--72.2%
Simplified72.2%
Taylor expanded in t around 0 69.0%
mul-1-neg69.0%
associate-/l*77.9%
Simplified77.9%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+43)
t
(if (<= z -5.5e-281)
(+ x (/ y (/ a t)))
(if (<= z 4e+130) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+43) {
tmp = t;
} else if (z <= -5.5e-281) {
tmp = x + (y / (a / t));
} else if (z <= 4e+130) {
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 <= (-3.8d+43)) then
tmp = t
else if (z <= (-5.5d-281)) then
tmp = x + (y / (a / t))
else if (z <= 4d+130) 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 <= -3.8e+43) {
tmp = t;
} else if (z <= -5.5e-281) {
tmp = x + (y / (a / t));
} else if (z <= 4e+130) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+43: tmp = t elif z <= -5.5e-281: tmp = x + (y / (a / t)) elif z <= 4e+130: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+43) tmp = t; elseif (z <= -5.5e-281) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 4e+130) 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 <= -3.8e+43) tmp = t; elseif (z <= -5.5e-281) tmp = x + (y / (a / t)); elseif (z <= 4e+130) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+43], t, If[LessEqual[z, -5.5e-281], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+130], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+43}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-281}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+130}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.80000000000000008e43 or 4.0000000000000002e130 < z Initial program 37.6%
associate-*l/71.9%
Simplified71.9%
Taylor expanded in z around inf 48.2%
if -3.80000000000000008e43 < z < -5.5000000000000003e-281Initial program 85.1%
associate-*l/94.0%
Simplified94.0%
Taylor expanded in z around 0 66.4%
Taylor expanded in t around inf 56.6%
associate-/l*56.6%
Simplified56.6%
if -5.5000000000000003e-281 < z < 4.0000000000000002e130Initial program 86.2%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in x around inf 65.6%
mul-1-neg65.6%
unsub-neg65.6%
Simplified65.6%
Taylor expanded in z around 0 57.1%
Final simplification53.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9e+91) (not (<= x 5.9e+82))) (* x (- 1.0 (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9e+91) || !(x <= 5.9e+82)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (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 ((x <= (-9d+91)) .or. (.not. (x <= 5.9d+82))) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t * ((y - z) / (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 ((x <= -9e+91) || !(x <= 5.9e+82)) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9e+91) or not (x <= 5.9e+82): tmp = x * (1.0 - (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9e+91) || !(x <= 5.9e+82)) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9e+91) || ~((x <= 5.9e+82))) tmp = x * (1.0 - (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9e+91], N[Not[LessEqual[x, 5.9e+82]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+91} \lor \neg \left(x \leq 5.9 \cdot 10^{+82}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -9e91 or 5.8999999999999997e82 < x Initial program 60.8%
associate-*l/82.6%
Simplified82.6%
Taylor expanded in x around inf 74.9%
mul-1-neg74.9%
unsub-neg74.9%
Simplified74.9%
Taylor expanded in z around 0 61.1%
if -9e91 < x < 5.8999999999999997e82Initial program 73.9%
associate-*l/89.3%
Simplified89.3%
Taylor expanded in x around 0 57.3%
associate-*r/72.7%
Simplified72.7%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.5e-14) (not (<= z 3.2e+130))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.5e-14) || !(z <= 3.2e+130)) {
tmp = t * ((y - z) / (a - 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 ((z <= (-3.5d-14)) .or. (.not. (z <= 3.2d+130))) then
tmp = t * ((y - z) / (a - 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 ((z <= -3.5e-14) || !(z <= 3.2e+130)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.5e-14) or not (z <= 3.2e+130): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.5e-14) || !(z <= 3.2e+130)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - 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 ((z <= -3.5e-14) || ~((z <= 3.2e+130))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.5e-14], N[Not[LessEqual[z, 3.2e+130]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-14} \lor \neg \left(z \leq 3.2 \cdot 10^{+130}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.5000000000000002e-14 or 3.2e130 < z Initial program 41.6%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in x around 0 45.1%
associate-*r/66.2%
Simplified66.2%
if -3.5000000000000002e-14 < z < 3.2e130Initial program 85.7%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 71.1%
Final simplification69.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.35e-9)
t
(if (<= z 3.7e-144)
x
(if (<= z 2.05e-64) (* x (/ y z)) (if (<= z 2.5e+130) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-9) {
tmp = t;
} else if (z <= 3.7e-144) {
tmp = x;
} else if (z <= 2.05e-64) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.35d-9)) then
tmp = t
else if (z <= 3.7d-144) then
tmp = x
else if (z <= 2.05d-64) then
tmp = x * (y / z)
else if (z <= 2.5d+130) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-9) {
tmp = t;
} else if (z <= 3.7e-144) {
tmp = x;
} else if (z <= 2.05e-64) {
tmp = x * (y / z);
} else if (z <= 2.5e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e-9: tmp = t elif z <= 3.7e-144: tmp = x elif z <= 2.05e-64: tmp = x * (y / z) elif z <= 2.5e+130: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e-9) tmp = t; elseif (z <= 3.7e-144) tmp = x; elseif (z <= 2.05e-64) tmp = Float64(x * Float64(y / z)); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e-9) tmp = t; elseif (z <= 3.7e-144) tmp = x; elseif (z <= 2.05e-64) tmp = x * (y / z); elseif (z <= 2.5e+130) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-9], t, If[LessEqual[z, 3.7e-144], x, If[LessEqual[z, 2.05e-64], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+130], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-9}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-144}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-64}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.3500000000000001e-9 or 2.4999999999999998e130 < z Initial program 41.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
if -1.3500000000000001e-9 < z < 3.7000000000000003e-144 or 2.05e-64 < z < 2.4999999999999998e130Initial program 83.8%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in a around inf 40.2%
if 3.7000000000000003e-144 < z < 2.05e-64Initial program 99.8%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 66.3%
mul-1-neg66.3%
unsub-neg66.3%
Simplified66.3%
Taylor expanded in a around 0 46.4%
Final simplification42.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.03) t (if (<= z 7.4e+130) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.03) {
tmp = t;
} else if (z <= 7.4e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-0.03d0)) then
tmp = t
else if (z <= 7.4d+130) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.03) {
tmp = t;
} else if (z <= 7.4e+130) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.03: tmp = t elif z <= 7.4e+130: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.03) tmp = t; elseif (z <= 7.4e+130) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.03) tmp = t; elseif (z <= 7.4e+130) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.03], t, If[LessEqual[z, 7.4e+130], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.03:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -0.029999999999999999 or 7.4000000000000003e130 < z Initial program 41.0%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in z around inf 46.1%
if -0.029999999999999999 < z < 7.4000000000000003e130Initial program 85.8%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in a around inf 37.8%
Final simplification41.0%
(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 68.8%
associate-*l/86.7%
Simplified86.7%
Taylor expanded in z around inf 23.1%
Final simplification23.1%
(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 2023274
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))