
(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 (or (<= t_1 -5e-246) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(+ t (/ (* (- t x) (- a 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 <= -5e-246) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = t + (((t - x) * (a - 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 <= -5e-246) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - 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[Or[LessEqual[t$95$1, -5e-246], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $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 -5 \cdot 10^{-246} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999997e-246 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 71.3%
+-commutative71.3%
associate-*l/89.4%
fma-def89.5%
Simplified89.5%
if -4.9999999999999997e-246 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 13.7%
+-commutative13.7%
associate-*l/13.8%
fma-def13.8%
Simplified13.8%
Taylor expanded in z around -inf 99.8%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -5e-246) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (/ (* (- t x) (- a 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 <= -5e-246) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - 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 <= (-5d-246)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t + (((t - x) * (a - 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 <= -5e-246) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - 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 <= -5e-246) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t + (((t - x) * (a - 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 <= -5e-246) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - 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 <= -5e-246) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t + (((t - x) * (a - 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[Or[LessEqual[t$95$1, -5e-246], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $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 -5 \cdot 10^{-246} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.9999999999999997e-246 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 71.3%
associate-*l/89.4%
Simplified89.4%
if -4.9999999999999997e-246 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 13.7%
+-commutative13.7%
associate-*l/13.8%
fma-def13.8%
Simplified13.8%
Taylor expanded in z around -inf 99.8%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z (- y a))))))
(if (<= z -4.5e+25)
t_1
(if (<= z 2.6e-157)
(+ x (/ (- t x) (/ a (- y z))))
(if (or (<= z 4.2e+92) (and (not (<= z 1.62e+146)) (<= z 9.5e+190)))
(+ x (/ (- y z) (/ (- a z) t)))
t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -4.5e+25) {
tmp = t_1;
} else if (z <= 2.6e-157) {
tmp = x + ((t - x) / (a / (y - z)));
} else if ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190))) {
tmp = x + ((y - z) / ((a - z) / t));
} 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 + (x / (z / (y - a)))
if (z <= (-4.5d+25)) then
tmp = t_1
else if (z <= 2.6d-157) then
tmp = x + ((t - x) / (a / (y - z)))
else if ((z <= 4.2d+92) .or. (.not. (z <= 1.62d+146)) .and. (z <= 9.5d+190)) then
tmp = x + ((y - z) / ((a - z) / t))
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 + (x / (z / (y - a)));
double tmp;
if (z <= -4.5e+25) {
tmp = t_1;
} else if (z <= 2.6e-157) {
tmp = x + ((t - x) / (a / (y - z)));
} else if ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190))) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / (y - a))) tmp = 0 if z <= -4.5e+25: tmp = t_1 elif z <= 2.6e-157: tmp = x + ((t - x) / (a / (y - z))) elif (z <= 4.2e+92) or (not (z <= 1.62e+146) and (z <= 9.5e+190)): tmp = x + ((y - z) / ((a - z) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -4.5e+25) tmp = t_1; elseif (z <= 2.6e-157) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); elseif ((z <= 4.2e+92) || (!(z <= 1.62e+146) && (z <= 9.5e+190))) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / (y - a))); tmp = 0.0; if (z <= -4.5e+25) tmp = t_1; elseif (z <= 2.6e-157) tmp = x + ((t - x) / (a / (y - z))); elseif ((z <= 4.2e+92) || (~((z <= 1.62e+146)) && (z <= 9.5e+190))) tmp = x + ((y - z) / ((a - z) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+25], t$95$1, If[LessEqual[z, 2.6e-157], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.2e+92], And[N[Not[LessEqual[z, 1.62e+146]], $MachinePrecision], LessEqual[z, 9.5e+190]]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-157}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+92} \lor \neg \left(z \leq 1.62 \cdot 10^{+146}\right) \land z \leq 9.5 \cdot 10^{+190}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.5000000000000003e25 or 4.19999999999999972e92 < z < 1.62e146 or 9.4999999999999995e190 < z Initial program 43.8%
+-commutative43.8%
associate-*l/69.8%
fma-def69.8%
Simplified69.8%
Taylor expanded in z around inf 66.5%
associate-/l*85.3%
distribute-lft-out--85.3%
Simplified85.3%
Taylor expanded in t around 0 69.2%
associate-/l*81.2%
Simplified81.2%
if -4.5000000000000003e25 < z < 2.59999999999999988e-157Initial program 92.1%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in a around inf 78.6%
associate-/l*85.0%
Simplified85.0%
if 2.59999999999999988e-157 < z < 4.19999999999999972e92 or 1.62e146 < z < 9.4999999999999995e190Initial program 69.7%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in t around inf 80.7%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z y)))))
(if (<= x -5.6e+88)
t_1
(if (<= x -3600.0)
(+ x (/ t (/ a y)))
(if (<= x 1560000.0)
(* t (/ (- y z) (- a z)))
(if (or (<= x 1.02e+74) (not (<= x 2.8e+132)))
(- x (/ x (/ a y)))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / y));
double tmp;
if (x <= -5.6e+88) {
tmp = t_1;
} else if (x <= -3600.0) {
tmp = x + (t / (a / y));
} else if (x <= 1560000.0) {
tmp = t * ((y - z) / (a - z));
} else if ((x <= 1.02e+74) || !(x <= 2.8e+132)) {
tmp = x - (x / (a / y));
} 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 + (x / (z / y))
if (x <= (-5.6d+88)) then
tmp = t_1
else if (x <= (-3600.0d0)) then
tmp = x + (t / (a / y))
else if (x <= 1560000.0d0) then
tmp = t * ((y - z) / (a - z))
else if ((x <= 1.02d+74) .or. (.not. (x <= 2.8d+132))) then
tmp = x - (x / (a / y))
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 + (x / (z / y));
double tmp;
if (x <= -5.6e+88) {
tmp = t_1;
} else if (x <= -3600.0) {
tmp = x + (t / (a / y));
} else if (x <= 1560000.0) {
tmp = t * ((y - z) / (a - z));
} else if ((x <= 1.02e+74) || !(x <= 2.8e+132)) {
tmp = x - (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / y)) tmp = 0 if x <= -5.6e+88: tmp = t_1 elif x <= -3600.0: tmp = x + (t / (a / y)) elif x <= 1560000.0: tmp = t * ((y - z) / (a - z)) elif (x <= 1.02e+74) or not (x <= 2.8e+132): tmp = x - (x / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / y))) tmp = 0.0 if (x <= -5.6e+88) tmp = t_1; elseif (x <= -3600.0) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (x <= 1560000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif ((x <= 1.02e+74) || !(x <= 2.8e+132)) tmp = Float64(x - Float64(x / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / y)); tmp = 0.0; if (x <= -5.6e+88) tmp = t_1; elseif (x <= -3600.0) tmp = x + (t / (a / y)); elseif (x <= 1560000.0) tmp = t * ((y - z) / (a - z)); elseif ((x <= 1.02e+74) || ~((x <= 2.8e+132))) tmp = x - (x / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+88], t$95$1, If[LessEqual[x, -3600.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1560000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.02e+74], N[Not[LessEqual[x, 2.8e+132]], $MachinePrecision]], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y}}\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3600:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;x \leq 1560000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+74} \lor \neg \left(x \leq 2.8 \cdot 10^{+132}\right):\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -5.59999999999999977e88 or 1.02000000000000005e74 < x < 2.7999999999999999e132Initial program 48.1%
+-commutative48.1%
associate-*l/75.2%
fma-def75.2%
Simplified75.2%
Taylor expanded in z around inf 54.3%
associate-/l*73.3%
distribute-lft-out--73.3%
Simplified73.3%
Taylor expanded in t around 0 54.4%
associate-/l*69.7%
Simplified69.7%
Taylor expanded in a around 0 51.0%
+-commutative51.0%
associate-/l*62.9%
Simplified62.9%
if -5.59999999999999977e88 < x < -3600Initial program 88.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 99.2%
Taylor expanded in z around 0 77.4%
+-commutative77.4%
associate-/l*83.1%
Simplified83.1%
if -3600 < x < 1.56e6Initial program 76.4%
associate-*l/91.8%
Simplified91.8%
Taylor expanded in x around 0 61.9%
*-commutative61.9%
associate-*l/77.4%
*-commutative77.4%
Simplified77.4%
if 1.56e6 < x < 1.02000000000000005e74 or 2.7999999999999999e132 < x Initial program 58.2%
associate-*l/69.5%
Simplified69.5%
Taylor expanded in z around 0 55.5%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in t around 0 55.5%
mul-1-neg55.5%
associate-/l*58.8%
Simplified58.8%
Final simplification70.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z (- y a))))))
(if (<= z -1.16e+25)
t_1
(if (<= z 2.6e+58)
(+ x (* (- t x) (/ y a)))
(if (or (<= z 9.8e+147) (not (<= z 1.06e+191)))
t_1
(* t (/ (- y z) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -1.16e+25) {
tmp = t_1;
} else if (z <= 2.6e+58) {
tmp = x + ((t - x) * (y / a));
} else if ((z <= 9.8e+147) || !(z <= 1.06e+191)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t + (x / (z / (y - a)))
if (z <= (-1.16d+25)) then
tmp = t_1
else if (z <= 2.6d+58) then
tmp = x + ((t - x) * (y / a))
else if ((z <= 9.8d+147) .or. (.not. (z <= 1.06d+191))) then
tmp = t_1
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 t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -1.16e+25) {
tmp = t_1;
} else if (z <= 2.6e+58) {
tmp = x + ((t - x) * (y / a));
} else if ((z <= 9.8e+147) || !(z <= 1.06e+191)) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / (y - a))) tmp = 0 if z <= -1.16e+25: tmp = t_1 elif z <= 2.6e+58: tmp = x + ((t - x) * (y / a)) elif (z <= 9.8e+147) or not (z <= 1.06e+191): tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -1.16e+25) tmp = t_1; elseif (z <= 2.6e+58) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); elseif ((z <= 9.8e+147) || !(z <= 1.06e+191)) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / (y - a))); tmp = 0.0; if (z <= -1.16e+25) tmp = t_1; elseif (z <= 2.6e+58) tmp = x + ((t - x) * (y / a)); elseif ((z <= 9.8e+147) || ~((z <= 1.06e+191))) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+25], t$95$1, If[LessEqual[z, 2.6e+58], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 9.8e+147], N[Not[LessEqual[z, 1.06e+191]], $MachinePrecision]], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+58}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+147} \lor \neg \left(z \leq 1.06 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -1.15999999999999992e25 or 2.59999999999999988e58 < z < 9.7999999999999996e147 or 1.06000000000000003e191 < z Initial program 44.9%
+-commutative44.9%
associate-*l/72.1%
fma-def72.1%
Simplified72.1%
Taylor expanded in z around inf 65.9%
associate-/l*85.1%
distribute-lft-out--85.1%
Simplified85.1%
Taylor expanded in t around 0 69.0%
associate-/l*79.0%
Simplified79.0%
if -1.15999999999999992e25 < z < 2.59999999999999988e58Initial program 89.4%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 74.9%
if 9.7999999999999996e147 < z < 1.06000000000000003e191Initial program 33.7%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in x around 0 23.9%
*-commutative23.9%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z (- y a))))))
(if (<= z -2.2e+25)
t_1
(if (<= z 3.9e+58)
(+ x (/ y (/ a (- t x))))
(if (or (<= z 3.35e+146) (not (<= z 5.5e+191)))
t_1
(* t (/ (- y z) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -2.2e+25) {
tmp = t_1;
} else if (z <= 3.9e+58) {
tmp = x + (y / (a / (t - x)));
} else if ((z <= 3.35e+146) || !(z <= 5.5e+191)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t + (x / (z / (y - a)))
if (z <= (-2.2d+25)) then
tmp = t_1
else if (z <= 3.9d+58) then
tmp = x + (y / (a / (t - x)))
else if ((z <= 3.35d+146) .or. (.not. (z <= 5.5d+191))) then
tmp = t_1
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 t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -2.2e+25) {
tmp = t_1;
} else if (z <= 3.9e+58) {
tmp = x + (y / (a / (t - x)));
} else if ((z <= 3.35e+146) || !(z <= 5.5e+191)) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / (y - a))) tmp = 0 if z <= -2.2e+25: tmp = t_1 elif z <= 3.9e+58: tmp = x + (y / (a / (t - x))) elif (z <= 3.35e+146) or not (z <= 5.5e+191): tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -2.2e+25) tmp = t_1; elseif (z <= 3.9e+58) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif ((z <= 3.35e+146) || !(z <= 5.5e+191)) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / (y - a))); tmp = 0.0; if (z <= -2.2e+25) tmp = t_1; elseif (z <= 3.9e+58) tmp = x + (y / (a / (t - x))); elseif ((z <= 3.35e+146) || ~((z <= 5.5e+191))) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+25], t$95$1, If[LessEqual[z, 3.9e+58], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.35e+146], N[Not[LessEqual[z, 5.5e+191]], $MachinePrecision]], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 3.35 \cdot 10^{+146} \lor \neg \left(z \leq 5.5 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -2.2000000000000001e25 or 3.9000000000000001e58 < z < 3.35000000000000003e146 or 5.5000000000000002e191 < z Initial program 44.9%
+-commutative44.9%
associate-*l/72.1%
fma-def72.1%
Simplified72.1%
Taylor expanded in z around inf 65.9%
associate-/l*85.1%
distribute-lft-out--85.1%
Simplified85.1%
Taylor expanded in t around 0 69.0%
associate-/l*79.0%
Simplified79.0%
if -2.2000000000000001e25 < z < 3.9000000000000001e58Initial program 89.4%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 70.6%
associate-/l*75.6%
Simplified75.6%
if 3.35000000000000003e146 < z < 5.5000000000000002e191Initial program 33.7%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in x around 0 23.9%
*-commutative23.9%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z (- y a))))))
(if (<= z -5.2e+25)
t_1
(if (<= z 8.2e+58)
(+ x (/ (- t x) (/ a (- y z))))
(if (or (<= z 2e+148) (not (<= z 2e+191)))
t_1
(* t (/ (- y z) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -5.2e+25) {
tmp = t_1;
} else if (z <= 8.2e+58) {
tmp = x + ((t - x) / (a / (y - z)));
} else if ((z <= 2e+148) || !(z <= 2e+191)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t + (x / (z / (y - a)))
if (z <= (-5.2d+25)) then
tmp = t_1
else if (z <= 8.2d+58) then
tmp = x + ((t - x) / (a / (y - z)))
else if ((z <= 2d+148) .or. (.not. (z <= 2d+191))) then
tmp = t_1
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 t_1 = t + (x / (z / (y - a)));
double tmp;
if (z <= -5.2e+25) {
tmp = t_1;
} else if (z <= 8.2e+58) {
tmp = x + ((t - x) / (a / (y - z)));
} else if ((z <= 2e+148) || !(z <= 2e+191)) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / (y - a))) tmp = 0 if z <= -5.2e+25: tmp = t_1 elif z <= 8.2e+58: tmp = x + ((t - x) / (a / (y - z))) elif (z <= 2e+148) or not (z <= 2e+191): tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -5.2e+25) tmp = t_1; elseif (z <= 8.2e+58) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); elseif ((z <= 2e+148) || !(z <= 2e+191)) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / (y - a))); tmp = 0.0; if (z <= -5.2e+25) tmp = t_1; elseif (z <= 8.2e+58) tmp = x + ((t - x) / (a / (y - z))); elseif ((z <= 2e+148) || ~((z <= 2e+191))) tmp = t_1; else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+25], t$95$1, If[LessEqual[z, 8.2e+58], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2e+148], N[Not[LessEqual[z, 2e+191]], $MachinePrecision]], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+148} \lor \neg \left(z \leq 2 \cdot 10^{+191}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if z < -5.1999999999999997e25 or 8.2e58 < z < 2.0000000000000001e148 or 2.00000000000000015e191 < z Initial program 44.9%
+-commutative44.9%
associate-*l/72.1%
fma-def72.1%
Simplified72.1%
Taylor expanded in z around inf 65.9%
associate-/l*85.1%
distribute-lft-out--85.1%
Simplified85.1%
Taylor expanded in t around 0 69.0%
associate-/l*79.0%
Simplified79.0%
if -5.1999999999999997e25 < z < 8.2e58Initial program 89.4%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in a around inf 73.3%
associate-/l*78.4%
Simplified78.4%
if 2.0000000000000001e148 < z < 2.00000000000000015e191Initial program 33.7%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in x around 0 23.9%
*-commutative23.9%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ x (/ z (- y a))))))
(if (<= x -8e+88)
t_1
(if (<= x -880.0)
(+ x (/ t (/ a y)))
(if (<= x 1300000.0)
(* t (/ (- y z) (- a z)))
(if (<= x 9.4e+72) (- x (/ x (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x / (z / (y - a)));
double tmp;
if (x <= -8e+88) {
tmp = t_1;
} else if (x <= -880.0) {
tmp = x + (t / (a / y));
} else if (x <= 1300000.0) {
tmp = t * ((y - z) / (a - z));
} else if (x <= 9.4e+72) {
tmp = x - (x / (a / y));
} 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 + (x / (z / (y - a)))
if (x <= (-8d+88)) then
tmp = t_1
else if (x <= (-880.0d0)) then
tmp = x + (t / (a / y))
else if (x <= 1300000.0d0) then
tmp = t * ((y - z) / (a - z))
else if (x <= 9.4d+72) then
tmp = x - (x / (a / y))
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 + (x / (z / (y - a)));
double tmp;
if (x <= -8e+88) {
tmp = t_1;
} else if (x <= -880.0) {
tmp = x + (t / (a / y));
} else if (x <= 1300000.0) {
tmp = t * ((y - z) / (a - z));
} else if (x <= 9.4e+72) {
tmp = x - (x / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x / (z / (y - a))) tmp = 0 if x <= -8e+88: tmp = t_1 elif x <= -880.0: tmp = x + (t / (a / y)) elif x <= 1300000.0: tmp = t * ((y - z) / (a - z)) elif x <= 9.4e+72: tmp = x - (x / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x / Float64(z / Float64(y - a)))) tmp = 0.0 if (x <= -8e+88) tmp = t_1; elseif (x <= -880.0) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (x <= 1300000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (x <= 9.4e+72) tmp = Float64(x - Float64(x / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x / (z / (y - a))); tmp = 0.0; if (x <= -8e+88) tmp = t_1; elseif (x <= -880.0) tmp = x + (t / (a / y)); elseif (x <= 1300000.0) tmp = t * ((y - z) / (a - z)); elseif (x <= 9.4e+72) tmp = x - (x / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e+88], t$95$1, If[LessEqual[x, -880.0], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1300000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.4e+72], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x}{\frac{z}{y - a}}\\
\mathbf{if}\;x \leq -8 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -880:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;x \leq 1300000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{+72}:\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -7.99999999999999968e88 or 9.40000000000000069e72 < x Initial program 48.3%
+-commutative48.3%
associate-*l/69.8%
fma-def69.9%
Simplified69.9%
Taylor expanded in z around inf 48.4%
associate-/l*65.3%
distribute-lft-out--65.3%
Simplified65.3%
Taylor expanded in t around 0 48.5%
associate-/l*63.1%
Simplified63.1%
if -7.99999999999999968e88 < x < -880Initial program 88.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 99.2%
Taylor expanded in z around 0 77.4%
+-commutative77.4%
associate-/l*83.1%
Simplified83.1%
if -880 < x < 1.3e6Initial program 76.4%
associate-*l/91.8%
Simplified91.8%
Taylor expanded in x around 0 61.9%
*-commutative61.9%
associate-*l/77.4%
*-commutative77.4%
Simplified77.4%
if 1.3e6 < x < 9.40000000000000069e72Initial program 73.6%
associate-*l/82.4%
Simplified82.4%
Taylor expanded in z around 0 69.2%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in t around 0 69.2%
mul-1-neg69.2%
associate-/l*69.6%
Simplified69.6%
Final simplification72.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -0.0023)
(+ x (/ t (/ a y)))
(if (<= a 7.9e-50)
(+ t (/ x (/ z y)))
(if (or (<= a 8.6e+19) (not (<= a 8e+172)))
(+ x (/ (* y t) a))
(+ t (/ x (/ (- z) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0023) {
tmp = x + (t / (a / y));
} else if (a <= 7.9e-50) {
tmp = t + (x / (z / y));
} else if ((a <= 8.6e+19) || !(a <= 8e+172)) {
tmp = x + ((y * t) / a);
} else {
tmp = t + (x / (-z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-0.0023d0)) then
tmp = x + (t / (a / y))
else if (a <= 7.9d-50) then
tmp = t + (x / (z / y))
else if ((a <= 8.6d+19) .or. (.not. (a <= 8d+172))) then
tmp = x + ((y * t) / a)
else
tmp = t + (x / (-z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.0023) {
tmp = x + (t / (a / y));
} else if (a <= 7.9e-50) {
tmp = t + (x / (z / y));
} else if ((a <= 8.6e+19) || !(a <= 8e+172)) {
tmp = x + ((y * t) / a);
} else {
tmp = t + (x / (-z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -0.0023: tmp = x + (t / (a / y)) elif a <= 7.9e-50: tmp = t + (x / (z / y)) elif (a <= 8.6e+19) or not (a <= 8e+172): tmp = x + ((y * t) / a) else: tmp = t + (x / (-z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.0023) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (a <= 7.9e-50) tmp = Float64(t + Float64(x / Float64(z / y))); elseif ((a <= 8.6e+19) || !(a <= 8e+172)) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(t + Float64(x / Float64(Float64(-z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -0.0023) tmp = x + (t / (a / y)); elseif (a <= 7.9e-50) tmp = t + (x / (z / y)); elseif ((a <= 8.6e+19) || ~((a <= 8e+172))) tmp = x + ((y * t) / a); else tmp = t + (x / (-z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.0023], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.9e-50], N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 8.6e+19], N[Not[LessEqual[a, 8e+172]], $MachinePrecision]], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t + N[(x / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.0023:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 7.9 \cdot 10^{-50}:\\
\;\;\;\;t + \frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{+19} \lor \neg \left(a \leq 8 \cdot 10^{+172}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x}{\frac{-z}{a}}\\
\end{array}
\end{array}
if a < -0.0023Initial program 71.1%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 82.5%
Taylor expanded in z around 0 55.8%
+-commutative55.8%
associate-/l*63.4%
Simplified63.4%
if -0.0023 < a < 7.9000000000000002e-50Initial program 65.2%
+-commutative65.2%
associate-*l/77.6%
fma-def77.6%
Simplified77.6%
Taylor expanded in z around inf 75.5%
associate-/l*86.6%
distribute-lft-out--86.6%
Simplified86.6%
Taylor expanded in t around 0 68.6%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in a around 0 67.7%
+-commutative67.7%
associate-/l*75.7%
Simplified75.7%
if 7.9000000000000002e-50 < a < 8.6e19 or 8.0000000000000007e172 < a Initial program 66.1%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in t around inf 83.5%
Taylor expanded in z around 0 66.2%
if 8.6e19 < a < 8.0000000000000007e172Initial program 67.3%
+-commutative67.3%
associate-*l/83.1%
fma-def83.1%
Simplified83.1%
Taylor expanded in z around inf 44.5%
associate-/l*58.2%
distribute-lft-out--58.2%
Simplified58.2%
Taylor expanded in t around 0 47.8%
associate-/l*55.8%
Simplified55.8%
Taylor expanded in y around 0 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e-31) (not (<= a 2.4e-194))) (+ x (/ (- y z) (/ (- a z) t))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e-31) || !(a <= 2.4e-194)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.9d-31)) .or. (.not. (a <= 2.4d-194))) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e-31) || !(a <= 2.4e-194)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e-31) or not (a <= 2.4e-194): tmp = x + ((y - z) / ((a - z) / t)) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e-31) || !(a <= 2.4e-194)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.9e-31) || ~((a <= 2.4e-194))) tmp = x + ((y - z) / ((a - z) / t)); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e-31], N[Not[LessEqual[a, 2.4e-194]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-31} \lor \neg \left(a \leq 2.4 \cdot 10^{-194}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -2.9000000000000001e-31 or 2.4e-194 < a Initial program 67.3%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in t around inf 75.7%
if -2.9000000000000001e-31 < a < 2.4e-194Initial program 66.6%
+-commutative66.6%
associate-*l/75.8%
fma-def75.8%
Simplified75.8%
Taylor expanded in z around -inf 83.7%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.8e-9) (not (<= a 1.3e-109))) (+ x (/ (- y z) (/ (- a z) t))) (+ t (/ (- t x) (/ z (- a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-9) || !(a <= 1.3e-109)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + ((t - x) / (z / (a - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.8d-9)) .or. (.not. (a <= 1.3d-109))) then
tmp = x + ((y - z) / ((a - z) / t))
else
tmp = t + ((t - x) / (z / (a - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-9) || !(a <= 1.3e-109)) {
tmp = x + ((y - z) / ((a - z) / t));
} else {
tmp = t + ((t - x) / (z / (a - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.8e-9) or not (a <= 1.3e-109): tmp = x + ((y - z) / ((a - z) / t)) else: tmp = t + ((t - x) / (z / (a - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.8e-9) || !(a <= 1.3e-109)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); else tmp = Float64(t + Float64(Float64(t - x) / Float64(z / Float64(a - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.8e-9) || ~((a <= 1.3e-109))) tmp = x + ((y - z) / ((a - z) / t)); else tmp = t + ((t - x) / (z / (a - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.8e-9], N[Not[LessEqual[a, 1.3e-109]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(t - x), $MachinePrecision] / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{-9} \lor \neg \left(a \leq 1.3 \cdot 10^{-109}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{\frac{z}{a - y}}\\
\end{array}
\end{array}
if a < -2.79999999999999984e-9 or 1.2999999999999999e-109 < a Initial program 69.3%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in t around inf 77.2%
if -2.79999999999999984e-9 < a < 1.2999999999999999e-109Initial program 64.0%
+-commutative64.0%
associate-*l/76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in z around inf 79.1%
associate-/l*89.7%
distribute-lft-out--89.7%
Simplified89.7%
Final simplification82.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+26) (not (<= z 4.8e+57))) (* t (- 1.0 (/ y z))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+26) || !(z <= 4.8e+57)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.2d+26)) .or. (.not. (z <= 4.8d+57))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+26) || !(z <= 4.8e+57)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+26) or not (z <= 4.8e+57): tmp = t * (1.0 - (y / z)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+26) || !(z <= 4.8e+57)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.2e+26) || ~((z <= 4.8e+57))) tmp = t * (1.0 - (y / z)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+26], N[Not[LessEqual[z, 4.8e+57]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+26} \lor \neg \left(z \leq 4.8 \cdot 10^{+57}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -4.2000000000000002e26 or 4.80000000000000009e57 < z Initial program 44.4%
associate-*l/73.7%
Simplified73.7%
Taylor expanded in a around 0 36.6%
mul-1-neg36.6%
associate-/l*55.9%
Simplified55.9%
Taylor expanded in t around inf 59.3%
if -4.2000000000000002e26 < z < 4.80000000000000009e57Initial program 89.3%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in t around inf 75.6%
Taylor expanded in z around 0 58.8%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.85e+26) (not (<= z 1.4e+53))) (* t (- 1.0 (/ y z))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.85e+26) || !(z <= 1.4e+53)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t / (a / y));
}
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.85d+26)) .or. (.not. (z <= 1.4d+53))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (t / (a / y))
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.85e+26) || !(z <= 1.4e+53)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.85e+26) or not (z <= 1.4e+53): tmp = t * (1.0 - (y / z)) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.85e+26) || !(z <= 1.4e+53)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.85e+26) || ~((z <= 1.4e+53))) tmp = t * (1.0 - (y / z)); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.85e+26], N[Not[LessEqual[z, 1.4e+53]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+26} \lor \neg \left(z \leq 1.4 \cdot 10^{+53}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.8500000000000002e26 or 1.4e53 < z Initial program 44.4%
associate-*l/73.7%
Simplified73.7%
Taylor expanded in a around 0 36.6%
mul-1-neg36.6%
associate-/l*55.9%
Simplified55.9%
Taylor expanded in t around inf 59.3%
if -2.8500000000000002e26 < z < 1.4e53Initial program 89.3%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in t around inf 75.6%
Taylor expanded in z around 0 58.8%
+-commutative58.8%
associate-/l*63.9%
Simplified63.9%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+26) (not (<= z 2.6e+58))) (+ t (/ x (/ z y))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+26) || !(z <= 2.6e+58)) {
tmp = t + (x / (z / y));
} else {
tmp = x + (t / (a / y));
}
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.2d+26)) .or. (.not. (z <= 2.6d+58))) then
tmp = t + (x / (z / y))
else
tmp = x + (t / (a / y))
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.2e+26) || !(z <= 2.6e+58)) {
tmp = t + (x / (z / y));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+26) or not (z <= 2.6e+58): tmp = t + (x / (z / y)) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+26) || !(z <= 2.6e+58)) tmp = Float64(t + Float64(x / Float64(z / y))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.2e+26) || ~((z <= 2.6e+58))) tmp = t + (x / (z / y)); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+26], N[Not[LessEqual[z, 2.6e+58]], $MachinePrecision]], N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+26} \lor \neg \left(z \leq 2.6 \cdot 10^{+58}\right):\\
\;\;\;\;t + \frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -4.2000000000000002e26 or 2.59999999999999988e58 < z Initial program 44.0%
+-commutative44.0%
associate-*l/73.5%
fma-def73.5%
Simplified73.5%
Taylor expanded in z around inf 61.9%
associate-/l*81.8%
distribute-lft-out--81.8%
Simplified81.8%
Taylor expanded in t around 0 65.4%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in a around 0 61.8%
+-commutative61.8%
associate-/l*68.9%
Simplified68.9%
if -4.2000000000000002e26 < z < 2.59999999999999988e58Initial program 89.4%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in t around inf 75.8%
Taylor expanded in z around 0 59.1%
+-commutative59.1%
associate-/l*64.2%
Simplified64.2%
Final simplification66.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.8e-13) x (if (<= a 4.7e+69) (* t (- 1.0 (/ y z))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.8e-13) {
tmp = x;
} else if (a <= 4.7e+69) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + 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 <= (-7.8d-13)) then
tmp = x
else if (a <= 4.7d+69) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + 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 <= -7.8e-13) {
tmp = x;
} else if (a <= 4.7e+69) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.8e-13: tmp = x elif a <= 4.7e+69: tmp = t * (1.0 - (y / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.8e-13) tmp = x; elseif (a <= 4.7e+69) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.8e-13) tmp = x; elseif (a <= 4.7e+69) tmp = t * (1.0 - (y / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.8e-13], x, If[LessEqual[a, 4.7e+69], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if a < -7.80000000000000009e-13Initial program 71.1%
associate-*l/92.1%
Simplified92.1%
Taylor expanded in a around inf 47.1%
if -7.80000000000000009e-13 < a < 4.69999999999999996e69Initial program 66.0%
associate-*l/79.4%
Simplified79.4%
Taylor expanded in a around 0 45.0%
mul-1-neg45.0%
associate-/l*59.0%
Simplified59.0%
Taylor expanded in t around inf 56.1%
if 4.69999999999999996e69 < a Initial program 65.0%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in t around inf 78.0%
Taylor expanded in z around inf 50.1%
Final simplification52.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+26) t (if (<= z 11000000.0) x (if (<= z 1.9e+220) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+26) {
tmp = t;
} else if (z <= 11000000.0) {
tmp = x;
} else if (z <= 1.9e+220) {
tmp = x + t;
} 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 <= (-2.6d+26)) then
tmp = t
else if (z <= 11000000.0d0) then
tmp = x
else if (z <= 1.9d+220) then
tmp = x + t
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 <= -2.6e+26) {
tmp = t;
} else if (z <= 11000000.0) {
tmp = x;
} else if (z <= 1.9e+220) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+26: tmp = t elif z <= 11000000.0: tmp = x elif z <= 1.9e+220: tmp = x + t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+26) tmp = t; elseif (z <= 11000000.0) tmp = x; elseif (z <= 1.9e+220) tmp = Float64(x + t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+26) tmp = t; elseif (z <= 11000000.0) tmp = x; elseif (z <= 1.9e+220) tmp = x + t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+26], t, If[LessEqual[z, 11000000.0], x, If[LessEqual[z, 1.9e+220], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+26}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 11000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+220}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.60000000000000002e26 or 1.89999999999999992e220 < z Initial program 44.6%
associate-*l/71.6%
Simplified71.6%
Taylor expanded in z around inf 58.6%
if -2.60000000000000002e26 < z < 1.1e7Initial program 90.8%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in a around inf 37.9%
if 1.1e7 < z < 1.89999999999999992e220Initial program 49.9%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in t around inf 69.0%
Taylor expanded in z around inf 45.2%
Final simplification46.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.6e-92) (+ x t) (if (<= z 2.4e-141) (* t (/ y a)) (if (<= z 1.7e+220) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e-92) {
tmp = x + t;
} else if (z <= 2.4e-141) {
tmp = t * (y / a);
} else if (z <= 1.7e+220) {
tmp = x + t;
} 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.6d-92)) then
tmp = x + t
else if (z <= 2.4d-141) then
tmp = t * (y / a)
else if (z <= 1.7d+220) then
tmp = x + t
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.6e-92) {
tmp = x + t;
} else if (z <= 2.4e-141) {
tmp = t * (y / a);
} else if (z <= 1.7e+220) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e-92: tmp = x + t elif z <= 2.4e-141: tmp = t * (y / a) elif z <= 1.7e+220: tmp = x + t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e-92) tmp = Float64(x + t); elseif (z <= 2.4e-141) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.7e+220) tmp = Float64(x + t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e-92) tmp = x + t; elseif (z <= 2.4e-141) tmp = t * (y / a); elseif (z <= 1.7e+220) tmp = x + t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e-92], N[(x + t), $MachinePrecision], If[LessEqual[z, 2.4e-141], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+220], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-92}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-141}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+220}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.60000000000000016e-92 or 2.4000000000000001e-141 < z < 1.7e220Initial program 61.0%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in t around inf 67.5%
Taylor expanded in z around inf 45.3%
if -3.60000000000000016e-92 < z < 2.4000000000000001e-141Initial program 97.0%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in t around inf 46.3%
Taylor expanded in z around 0 39.5%
if 1.7e220 < z Initial program 18.4%
associate-*l/54.7%
Simplified54.7%
Taylor expanded in z around inf 74.9%
Final simplification46.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.12e+57) (/ x (/ z y)) (if (<= y 4.1e+102) (+ x t) (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.12e+57) {
tmp = x / (z / y);
} else if (y <= 4.1e+102) {
tmp = x + t;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.12d+57)) then
tmp = x / (z / y)
else if (y <= 4.1d+102) then
tmp = x + t
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.12e+57) {
tmp = x / (z / y);
} else if (y <= 4.1e+102) {
tmp = x + t;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.12e+57: tmp = x / (z / y) elif y <= 4.1e+102: tmp = x + t else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.12e+57) tmp = Float64(x / Float64(z / y)); elseif (y <= 4.1e+102) tmp = Float64(x + t); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.12e+57) tmp = x / (z / y); elseif (y <= 4.1e+102) tmp = x + t; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.12e+57], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+102], N[(x + t), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+57}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+102}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.12000000000000003e57Initial program 57.1%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in a around 0 36.6%
mul-1-neg36.6%
associate-/l*50.9%
Simplified50.9%
Taylor expanded in x around -inf 25.6%
associate-/l*40.7%
Simplified40.7%
if -1.12000000000000003e57 < y < 4.1e102Initial program 69.5%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in t around inf 69.9%
Taylor expanded in z around inf 46.5%
if 4.1e102 < y Initial program 67.8%
associate-*l/91.8%
Simplified91.8%
Taylor expanded in t around inf 75.4%
Taylor expanded in z around 0 44.8%
Final simplification45.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.7e+25) t (if (<= z 3.4e+58) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.7e+25) {
tmp = t;
} else if (z <= 3.4e+58) {
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 <= (-2.7d+25)) then
tmp = t
else if (z <= 3.4d+58) 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 <= -2.7e+25) {
tmp = t;
} else if (z <= 3.4e+58) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.7e+25: tmp = t elif z <= 3.4e+58: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.7e+25) tmp = t; elseif (z <= 3.4e+58) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.7e+25) tmp = t; elseif (z <= 3.4e+58) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.7e+25], t, If[LessEqual[z, 3.4e+58], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+25}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+58}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.7e25 or 3.4000000000000001e58 < z Initial program 44.0%
associate-*l/73.5%
Simplified73.5%
Taylor expanded in z around inf 51.6%
if -2.7e25 < z < 3.4000000000000001e58Initial program 89.4%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in a around inf 37.0%
Final simplification44.2%
(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 67.1%
associate-*l/83.8%
Simplified83.8%
Taylor expanded in z around inf 30.5%
Final simplification30.5%
(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 2023297
(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))))