
(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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (<= t_2 -1e-284)
t_2
(if (<= t_2 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(if (<= t_2 20000000.0)
(+ x (/ (* (- y z) (- t x)) (- a z)))
(fma (- y z) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / (a - z);
double t_2 = x + ((y - z) * t_1);
double tmp;
if (t_2 <= -1e-284) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_2 <= 20000000.0) {
tmp = x + (((y - z) * (t - x)) / (a - z));
} else {
tmp = fma((y - z), t_1, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / Float64(a - z)) t_2 = Float64(x + Float64(Float64(y - z) * t_1)) tmp = 0.0 if (t_2 <= -1e-284) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); elseif (t_2 <= 20000000.0) tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))); else tmp = fma(Float64(y - z), t_1, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-284], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 20000000.0], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-284}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;t\_2 \leq 20000000:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t\_1, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284Initial program 92.6%
if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
fma-define3.1%
Simplified3.1%
Taylor expanded in z around inf 86.6%
associate--l+86.6%
distribute-lft-out--86.6%
div-sub86.7%
mul-1-neg86.7%
unsub-neg86.7%
div-sub86.6%
associate-/l*91.0%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e7Initial program 63.0%
associate-*r/86.2%
Applied egg-rr86.2%
if 2e7 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.9%
+-commutative95.9%
fma-define96.0%
Simplified96.0%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -1e-284)
t_1
(if (<= t_1 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(if (<= t_1 1000000.0)
(+ x (/ (* (- y z) (- t x)) (- a z)))
(+ x (/ (- y z) (/ (- a z) (- t x)))))))))
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-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 1000000.0) {
tmp = x + (((y - z) * (t - x)) / (a - z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-1d-284)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) / z) * (a - y))
else if (t_1 <= 1000000.0d0) then
tmp = x + (((y - z) * (t - x)) / (a - z))
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -1e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 1000000.0) {
tmp = x + (((y - z) * (t - x)) / (a - z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -1e-284: tmp = t_1 elif t_1 <= 0.0: tmp = t + (((t - x) / z) * (a - y)) elif t_1 <= 1000000.0: tmp = x + (((y - z) * (t - x)) / (a - z)) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -1e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); elseif (t_1 <= 1000000.0) tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); 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-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = t + (((t - x) / z) * (a - y)); elseif (t_1 <= 1000000.0) tmp = x + (((y - z) * (t - x)) / (a - z)); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-284], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1000000.0], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;t\_1 \leq 1000000:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284Initial program 92.6%
if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
fma-define3.1%
Simplified3.1%
Taylor expanded in z around inf 86.6%
associate--l+86.6%
distribute-lft-out--86.6%
div-sub86.7%
mul-1-neg86.7%
unsub-neg86.7%
div-sub86.6%
associate-/l*91.0%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1e6Initial program 61.8%
associate-*r/85.8%
Applied egg-rr85.8%
if 1e6 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.9%
clear-num95.8%
un-div-inv96.0%
Applied egg-rr96.0%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -1e-284)
t_1
(if (<= t_1 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(if (<= t_1 20000000.0) (+ x (/ (* (- y z) (- t x)) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -1e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 20000000.0) {
tmp = x + (((y - z) * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-1d-284)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) / z) * (a - y))
else if (t_1 <= 20000000.0d0) then
tmp = x + (((y - z) * (t - x)) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -1e-284) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else if (t_1 <= 20000000.0) {
tmp = x + (((y - z) * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -1e-284: tmp = t_1 elif t_1 <= 0.0: tmp = t + (((t - x) / z) * (a - y)) elif t_1 <= 20000000.0: tmp = x + (((y - z) * (t - x)) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -1e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); elseif (t_1 <= 20000000.0) tmp = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -1e-284) tmp = t_1; elseif (t_1 <= 0.0) tmp = t + (((t - x) / z) * (a - y)); elseif (t_1 <= 20000000.0) tmp = x + (((y - z) * (t - x)) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-284], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20000000.0], N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{elif}\;t\_1 \leq 20000000:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284 or 2e7 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.0%
if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
fma-define3.1%
Simplified3.1%
Taylor expanded in z around inf 86.6%
associate--l+86.6%
distribute-lft-out--86.6%
div-sub86.7%
mul-1-neg86.7%
unsub-neg86.7%
div-sub86.6%
associate-/l*91.0%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e7Initial program 63.0%
associate-*r/86.2%
Applied egg-rr86.2%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-284) (not (<= t_1 2e-236)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
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-284) || !(t_1 <= 2e-236)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-284)) .or. (.not. (t_1 <= 2d-236))) then
tmp = t_1
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 t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-284) || !(t_1 <= 2e-236)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-284) or not (t_1 <= 2e-236): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-284) || !(t_1 <= 2e-236)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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-284) || ~((t_1 <= 2e-236))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-284], N[Not[LessEqual[t$95$1, 2e-236]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-284} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-236}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000004e-284 or 2.0000000000000001e-236 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
if -1.00000000000000004e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-236Initial program 3.6%
+-commutative3.6%
fma-define3.4%
Simplified3.4%
Taylor expanded in z around inf 84.4%
associate--l+84.4%
distribute-lft-out--84.4%
div-sub84.4%
mul-1-neg84.4%
unsub-neg84.4%
div-sub84.4%
associate-/l*84.4%
associate-/l*92.3%
distribute-rgt-out--92.4%
Simplified92.4%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y z) (- a z))))
(if (<= z -8.2e-5)
(- t (* y (/ (- t x) z)))
(if (<= z -2.6e-163)
(* x (- 1.0 t_1))
(if (<= z 1.3e-29) (+ x (* y (/ (- t x) a))) (* t t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double tmp;
if (z <= -8.2e-5) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -2.6e-163) {
tmp = x * (1.0 - t_1);
} else if (z <= 1.3e-29) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - z) / (a - z)
if (z <= (-8.2d-5)) then
tmp = t - (y * ((t - x) / z))
else if (z <= (-2.6d-163)) then
tmp = x * (1.0d0 - t_1)
else if (z <= 1.3d-29) then
tmp = x + (y * ((t - x) / a))
else
tmp = t * t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (a - z);
double tmp;
if (z <= -8.2e-5) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -2.6e-163) {
tmp = x * (1.0 - t_1);
} else if (z <= 1.3e-29) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) / (a - z) tmp = 0 if z <= -8.2e-5: tmp = t - (y * ((t - x) / z)) elif z <= -2.6e-163: tmp = x * (1.0 - t_1) elif z <= 1.3e-29: tmp = x + (y * ((t - x) / a)) else: tmp = t * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(a - z)) tmp = 0.0 if (z <= -8.2e-5) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif (z <= -2.6e-163) tmp = Float64(x * Float64(1.0 - t_1)); elseif (z <= 1.3e-29) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) / (a - z); tmp = 0.0; if (z <= -8.2e-5) tmp = t - (y * ((t - x) / z)); elseif (z <= -2.6e-163) tmp = x * (1.0 - t_1); elseif (z <= 1.3e-29) tmp = x + (y * ((t - x) / a)); else tmp = t * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e-5], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-163], N[(x * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-29], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{-5}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \left(1 - t\_1\right)\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot t\_1\\
\end{array}
\end{array}
if z < -8.20000000000000009e-5Initial program 67.3%
clear-num66.0%
associate-/r/67.4%
Applied egg-rr67.4%
Taylor expanded in a around 0 43.2%
Taylor expanded in y around 0 69.1%
div-sub69.1%
associate-*r/62.1%
mul-1-neg62.1%
unsub-neg62.1%
associate-*r/69.1%
Simplified69.1%
if -8.20000000000000009e-5 < z < -2.60000000000000002e-163Initial program 79.5%
+-commutative79.5%
fma-define79.7%
Simplified79.7%
Taylor expanded in t around 0 60.3%
mul-1-neg60.3%
*-rgt-identity60.3%
associate-/l*69.2%
distribute-rgt-neg-in69.2%
mul-1-neg69.2%
distribute-lft-in69.2%
mul-1-neg69.2%
unsub-neg69.2%
Simplified69.2%
if -2.60000000000000002e-163 < z < 1.3000000000000001e-29Initial program 95.4%
Taylor expanded in z around 0 75.9%
associate-/l*82.8%
Simplified82.8%
if 1.3000000000000001e-29 < z Initial program 81.8%
clear-num81.8%
associate-/r/81.6%
Applied egg-rr81.6%
associate-*l/81.8%
*-un-lft-identity81.8%
associate-/l*58.4%
+-commutative58.4%
div-inv58.3%
fma-define58.3%
Applied egg-rr58.3%
Taylor expanded in t around inf 67.3%
div-sub67.3%
Simplified67.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.25e-52)
t_1
(if (<= z -4e-169)
(* x (- 1.0 (/ y a)))
(if (<= z 7.4e-29) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.25e-52) {
tmp = t_1;
} else if (z <= -4e-169) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7.4e-29) {
tmp = x + (t * (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 = t * ((y - z) / (a - z))
if (z <= (-1.25d-52)) then
tmp = t_1
else if (z <= (-4d-169)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 7.4d-29) then
tmp = x + (t * (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 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.25e-52) {
tmp = t_1;
} else if (z <= -4e-169) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7.4e-29) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.25e-52: tmp = t_1 elif z <= -4e-169: tmp = x * (1.0 - (y / a)) elif z <= 7.4e-29: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.25e-52) tmp = t_1; elseif (z <= -4e-169) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 7.4e-29) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.25e-52) tmp = t_1; elseif (z <= -4e-169) tmp = x * (1.0 - (y / a)); elseif (z <= 7.4e-29) tmp = x + (t * (y / a)); 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[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e-52], t$95$1, If[LessEqual[z, -4e-169], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-29], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-169}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-29}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25e-52 or 7.3999999999999995e-29 < z Initial program 74.9%
clear-num74.3%
associate-/r/74.9%
Applied egg-rr74.9%
associate-*l/74.9%
*-un-lft-identity74.9%
associate-/l*55.8%
+-commutative55.8%
div-inv55.7%
fma-define55.8%
Applied egg-rr55.8%
Taylor expanded in t around inf 67.4%
div-sub67.4%
Simplified67.4%
if -1.25e-52 < z < -4.00000000000000008e-169Initial program 79.4%
+-commutative79.4%
fma-define79.6%
Simplified79.6%
Taylor expanded in x around -inf 77.9%
associate-*r*77.9%
neg-mul-177.9%
+-commutative77.9%
Simplified77.9%
Taylor expanded in z around 0 64.8%
if -4.00000000000000008e-169 < z < 7.3999999999999995e-29Initial program 95.3%
Taylor expanded in t around inf 72.9%
Taylor expanded in z around 0 63.2%
associate-/l*71.4%
Simplified71.4%
Final simplification68.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.5e+123)
t
(if (<= z -2.25e-169)
(* x (- 1.0 (/ y a)))
(if (<= z 3.55e+143) (+ x (* t (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+123) {
tmp = t;
} else if (z <= -2.25e-169) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.55e+143) {
tmp = x + (t * (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 <= (-6.5d+123)) then
tmp = t
else if (z <= (-2.25d-169)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.55d+143) then
tmp = x + (t * (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 <= -6.5e+123) {
tmp = t;
} else if (z <= -2.25e-169) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.55e+143) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+123: tmp = t elif z <= -2.25e-169: tmp = x * (1.0 - (y / a)) elif z <= 3.55e+143: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+123) tmp = t; elseif (z <= -2.25e-169) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.55e+143) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+123) tmp = t; elseif (z <= -2.25e-169) tmp = x * (1.0 - (y / a)); elseif (z <= 3.55e+143) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+123], t, If[LessEqual[z, -2.25e-169], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.55e+143], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+123}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-169}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.5000000000000001e123 or 3.55000000000000021e143 < z Initial program 64.3%
Taylor expanded in t around inf 55.2%
Taylor expanded in z around inf 48.5%
Taylor expanded in x around 0 62.1%
if -6.5000000000000001e123 < z < -2.2499999999999999e-169Initial program 83.0%
+-commutative83.0%
fma-define83.1%
Simplified83.1%
Taylor expanded in x around -inf 59.2%
associate-*r*59.2%
neg-mul-159.2%
+-commutative59.2%
Simplified59.2%
Taylor expanded in z around 0 50.6%
if -2.2499999999999999e-169 < z < 3.55000000000000021e143Initial program 93.3%
Taylor expanded in t around inf 71.2%
Taylor expanded in z around 0 54.7%
associate-/l*61.8%
Simplified61.8%
Final simplification58.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.8e-87)
(* x (+ 1.0 (/ t x)))
(if (<= a -4.3e-121)
t
(if (<= a 5.3e-163) (* x (/ (- y a) z)) (if (<= a 1.15e-25) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-87) {
tmp = x * (1.0 + (t / x));
} else if (a <= -4.3e-121) {
tmp = t;
} else if (a <= 5.3e-163) {
tmp = x * ((y - a) / z);
} else if (a <= 1.15e-25) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.8d-87)) then
tmp = x * (1.0d0 + (t / x))
else if (a <= (-4.3d-121)) then
tmp = t
else if (a <= 5.3d-163) then
tmp = x * ((y - a) / z)
else if (a <= 1.15d-25) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-87) {
tmp = x * (1.0 + (t / x));
} else if (a <= -4.3e-121) {
tmp = t;
} else if (a <= 5.3e-163) {
tmp = x * ((y - a) / z);
} else if (a <= 1.15e-25) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e-87: tmp = x * (1.0 + (t / x)) elif a <= -4.3e-121: tmp = t elif a <= 5.3e-163: tmp = x * ((y - a) / z) elif a <= 1.15e-25: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e-87) tmp = Float64(x * Float64(1.0 + Float64(t / x))); elseif (a <= -4.3e-121) tmp = t; elseif (a <= 5.3e-163) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (a <= 1.15e-25) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e-87) tmp = x * (1.0 + (t / x)); elseif (a <= -4.3e-121) tmp = t; elseif (a <= 5.3e-163) tmp = x * ((y - a) / z); elseif (a <= 1.15e-25) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e-87], N[(x * N[(1.0 + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.3e-121], t, If[LessEqual[a, 5.3e-163], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-25], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(1 + \frac{t}{x}\right)\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-121}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 5.3 \cdot 10^{-163}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-25}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.8e-87Initial program 85.6%
Taylor expanded in t around inf 70.9%
Taylor expanded in z around inf 39.5%
Taylor expanded in x around inf 41.6%
if -3.8e-87 < a < -4.29999999999999965e-121 or 5.30000000000000016e-163 < a < 1.15e-25Initial program 78.0%
Taylor expanded in t around inf 52.1%
Taylor expanded in z around inf 30.5%
Taylor expanded in x around 0 49.1%
if -4.29999999999999965e-121 < a < 5.30000000000000016e-163Initial program 72.0%
+-commutative72.0%
fma-define72.2%
Simplified72.2%
Taylor expanded in x around -inf 54.6%
associate-*r*54.6%
neg-mul-154.6%
+-commutative54.6%
Simplified54.6%
Taylor expanded in z around -inf 43.7%
associate-/l*49.6%
Simplified49.6%
if 1.15e-25 < a Initial program 91.3%
+-commutative91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in a around inf 50.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.2e-87)
(* x (+ 1.0 (/ t x)))
(if (<= a -2.9e-121)
t
(if (<= a 4.7e-164) (* x (/ y z)) (if (<= a 9e-26) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e-87) {
tmp = x * (1.0 + (t / x));
} else if (a <= -2.9e-121) {
tmp = t;
} else if (a <= 4.7e-164) {
tmp = x * (y / z);
} else if (a <= 9e-26) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.2d-87)) then
tmp = x * (1.0d0 + (t / x))
else if (a <= (-2.9d-121)) then
tmp = t
else if (a <= 4.7d-164) then
tmp = x * (y / z)
else if (a <= 9d-26) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e-87) {
tmp = x * (1.0 + (t / x));
} else if (a <= -2.9e-121) {
tmp = t;
} else if (a <= 4.7e-164) {
tmp = x * (y / z);
} else if (a <= 9e-26) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.2e-87: tmp = x * (1.0 + (t / x)) elif a <= -2.9e-121: tmp = t elif a <= 4.7e-164: tmp = x * (y / z) elif a <= 9e-26: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e-87) tmp = Float64(x * Float64(1.0 + Float64(t / x))); elseif (a <= -2.9e-121) tmp = t; elseif (a <= 4.7e-164) tmp = Float64(x * Float64(y / z)); elseif (a <= 9e-26) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.2e-87) tmp = x * (1.0 + (t / x)); elseif (a <= -2.9e-121) tmp = t; elseif (a <= 4.7e-164) tmp = x * (y / z); elseif (a <= 9e-26) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e-87], N[(x * N[(1.0 + N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.9e-121], t, If[LessEqual[a, 4.7e-164], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-26], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-87}:\\
\;\;\;\;x \cdot \left(1 + \frac{t}{x}\right)\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-121}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-164}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-26}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.2000000000000006e-87Initial program 85.6%
Taylor expanded in t around inf 70.9%
Taylor expanded in z around inf 39.5%
Taylor expanded in x around inf 41.6%
if -9.2000000000000006e-87 < a < -2.9e-121 or 4.6999999999999997e-164 < a < 8.9999999999999998e-26Initial program 78.0%
Taylor expanded in t around inf 52.1%
Taylor expanded in z around inf 30.5%
Taylor expanded in x around 0 49.1%
if -2.9e-121 < a < 4.6999999999999997e-164Initial program 72.0%
+-commutative72.0%
fma-define72.2%
Simplified72.2%
Taylor expanded in x around -inf 54.6%
associate-*r*54.6%
neg-mul-154.6%
+-commutative54.6%
Simplified54.6%
Taylor expanded in a around 0 40.0%
associate-/l*44.4%
Simplified44.4%
if 8.9999999999999998e-26 < a Initial program 91.3%
+-commutative91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in a around inf 50.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.7e-87) (not (<= a 2e-140))) (+ x (* t (/ (- y z) (- a z)))) (+ t (* (/ (- t x) z) (- a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.7e-87) || !(a <= 2e-140)) {
tmp = x + (t * ((y - z) / (a - z)));
} 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.7d-87)) .or. (.not. (a <= 2d-140))) then
tmp = x + (t * ((y - z) / (a - z)))
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.7e-87) || !(a <= 2e-140)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.7e-87) or not (a <= 2e-140): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.7e-87) || !(a <= 2e-140)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.7e-87) || ~((a <= 2e-140))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.7e-87], N[Not[LessEqual[a, 2e-140]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{-87} \lor \neg \left(a \leq 2 \cdot 10^{-140}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if a < -2.69999999999999984e-87 or 2e-140 < a Initial program 88.5%
Taylor expanded in t around inf 64.9%
associate-/l*79.0%
Simplified79.0%
if -2.69999999999999984e-87 < a < 2e-140Initial program 69.7%
+-commutative69.7%
fma-define69.8%
Simplified69.8%
Taylor expanded in z around inf 84.6%
associate--l+84.6%
distribute-lft-out--84.6%
div-sub84.7%
mul-1-neg84.7%
unsub-neg84.7%
div-sub84.6%
associate-/l*83.5%
associate-/l*77.2%
distribute-rgt-out--84.8%
Simplified84.8%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-87) (not (<= a 2.3e-121))) (+ x (* t (/ (- y z) (- a z)))) (- t (* y (/ (- t x) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-87) || !(a <= 2.3e-121)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (y * ((t - x) / 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 <= (-3d-87)) .or. (.not. (a <= 2.3d-121))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t - (y * ((t - x) / 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 <= -3e-87) || !(a <= 2.3e-121)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (y * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-87) or not (a <= 2.3e-121): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t - (y * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-87) || !(a <= 2.3e-121)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-87) || ~((a <= 2.3e-121))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t - (y * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-87], N[Not[LessEqual[a, 2.3e-121]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-87} \lor \neg \left(a \leq 2.3 \cdot 10^{-121}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if a < -3.00000000000000016e-87 or 2.30000000000000012e-121 < a Initial program 88.2%
Taylor expanded in t around inf 65.8%
associate-/l*79.6%
Simplified79.6%
if -3.00000000000000016e-87 < a < 2.30000000000000012e-121Initial program 71.1%
clear-num69.9%
associate-/r/70.9%
Applied egg-rr70.9%
Taylor expanded in a around 0 61.5%
Taylor expanded in y around 0 79.6%
div-sub80.8%
associate-*r/79.2%
mul-1-neg79.2%
unsub-neg79.2%
associate-*r/80.8%
Simplified80.8%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.9e-12) (not (<= z 8.6e-35))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.9e-12) || !(z <= 8.6e-35)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-6.9d-12)) .or. (.not. (z <= 8.6d-35))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.9e-12) || !(z <= 8.6e-35)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.9e-12) or not (z <= 8.6e-35): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.9e-12) || !(z <= 8.6e-35)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.9e-12) || ~((z <= 8.6e-35))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.9e-12], N[Not[LessEqual[z, 8.6e-35]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{-12} \lor \neg \left(z \leq 8.6 \cdot 10^{-35}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -6.9000000000000001e-12 or 8.6000000000000004e-35 < z Initial program 74.0%
clear-num73.3%
associate-/r/73.9%
Applied egg-rr73.9%
associate-*l/74.0%
*-un-lft-identity74.0%
associate-/l*54.1%
+-commutative54.1%
div-inv54.0%
fma-define54.1%
Applied egg-rr54.1%
Taylor expanded in t around inf 67.6%
div-sub67.6%
Simplified67.6%
if -6.9000000000000001e-12 < z < 8.6000000000000004e-35Initial program 92.0%
Taylor expanded in z around 0 69.1%
associate-/l*75.9%
Simplified75.9%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.2e+80) (+ x (/ (- y z) (/ a t))) (if (<= a 4e-30) (- t (* y (/ (- t x) z))) (+ x (* y (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+80) {
tmp = x + ((y - z) / (a / t));
} else if (a <= 4e-30) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.2d+80)) then
tmp = x + ((y - z) / (a / t))
else if (a <= 4d-30) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+80) {
tmp = x + ((y - z) / (a / t));
} else if (a <= 4e-30) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.2e+80: tmp = x + ((y - z) / (a / t)) elif a <= 4e-30: tmp = t - (y * ((t - x) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e+80) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / t))); elseif (a <= 4e-30) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.2e+80) tmp = x + ((y - z) / (a / t)); elseif (a <= 4e-30) tmp = t - (y * ((t - x) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e+80], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-30], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{+80}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t}}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-30}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if a < -9.20000000000000016e80Initial program 90.0%
Taylor expanded in t around inf 81.1%
clear-num81.0%
un-div-inv81.2%
Applied egg-rr81.2%
Taylor expanded in a around inf 71.6%
if -9.20000000000000016e80 < a < 4e-30Initial program 75.2%
clear-num74.4%
associate-/r/75.0%
Applied egg-rr75.0%
Taylor expanded in a around 0 54.4%
Taylor expanded in y around 0 70.8%
div-sub71.5%
associate-*r/68.5%
mul-1-neg68.5%
unsub-neg68.5%
associate-*r/71.5%
Simplified71.5%
if 4e-30 < a Initial program 91.4%
Taylor expanded in z around 0 65.1%
associate-/l*73.0%
Simplified73.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.4e+89) (not (<= y 7.8e+52))) (* y (/ x (- z a))) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.4e+89) || !(y <= 7.8e+52)) {
tmp = y * (x / (z - a));
} 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 ((y <= (-1.4d+89)) .or. (.not. (y <= 7.8d+52))) then
tmp = y * (x / (z - a))
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 ((y <= -1.4e+89) || !(y <= 7.8e+52)) {
tmp = y * (x / (z - a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.4e+89) or not (y <= 7.8e+52): tmp = y * (x / (z - a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.4e+89) || !(y <= 7.8e+52)) tmp = Float64(y * Float64(x / Float64(z - a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.4e+89) || ~((y <= 7.8e+52))) tmp = y * (x / (z - a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.4e+89], N[Not[LessEqual[y, 7.8e+52]], $MachinePrecision]], N[(y * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+89} \lor \neg \left(y \leq 7.8 \cdot 10^{+52}\right):\\
\;\;\;\;y \cdot \frac{x}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.3999999999999999e89 or 7.7999999999999999e52 < y Initial program 89.9%
+-commutative89.9%
fma-define90.0%
Simplified90.0%
Taylor expanded in x around -inf 54.2%
associate-*r*54.2%
neg-mul-154.2%
+-commutative54.2%
Simplified54.2%
Taylor expanded in y around inf 38.3%
mul-1-neg38.3%
Simplified38.3%
Taylor expanded in x around 0 38.3%
associate-*r/38.3%
sub-neg38.3%
remove-double-neg38.3%
distribute-neg-in38.3%
distribute-frac-neg238.3%
distribute-frac-neg38.3%
mul-1-neg38.3%
remove-double-neg38.3%
*-commutative38.3%
associate-/l*42.9%
+-commutative42.9%
unsub-neg42.9%
Simplified42.9%
if -1.3999999999999999e89 < y < 7.7999999999999999e52Initial program 77.2%
Taylor expanded in t around inf 70.5%
Taylor expanded in z around inf 47.6%
Final simplification45.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.1e+95) t (if (<= z 3.55e+143) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+95) {
tmp = t;
} else if (z <= 3.55e+143) {
tmp = x + (t * (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 <= (-4.1d+95)) then
tmp = t
else if (z <= 3.55d+143) then
tmp = x + (t * (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 <= -4.1e+95) {
tmp = t;
} else if (z <= 3.55e+143) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.1e+95: tmp = t elif z <= 3.55e+143: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+95) tmp = t; elseif (z <= 3.55e+143) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.1e+95) tmp = t; elseif (z <= 3.55e+143) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+95], t, If[LessEqual[z, 3.55e+143], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.09999999999999986e95 or 3.55000000000000021e143 < z Initial program 63.2%
Taylor expanded in t around inf 53.2%
Taylor expanded in z around inf 46.8%
Taylor expanded in x around 0 61.1%
if -4.09999999999999986e95 < z < 3.55000000000000021e143Initial program 90.4%
Taylor expanded in t around inf 68.1%
Taylor expanded in z around 0 48.8%
associate-/l*54.4%
Simplified54.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -4e-100) (+ x t) (if (<= a 2.5e-156) (* x (/ y z)) (if (<= a 1.05e-25) t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-100) {
tmp = x + t;
} else if (a <= 2.5e-156) {
tmp = x * (y / z);
} else if (a <= 1.05e-25) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4d-100)) then
tmp = x + t
else if (a <= 2.5d-156) then
tmp = x * (y / z)
else if (a <= 1.05d-25) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-100) {
tmp = x + t;
} else if (a <= 2.5e-156) {
tmp = x * (y / z);
} else if (a <= 1.05e-25) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4e-100: tmp = x + t elif a <= 2.5e-156: tmp = x * (y / z) elif a <= 1.05e-25: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e-100) tmp = Float64(x + t); elseif (a <= 2.5e-156) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.05e-25) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4e-100) tmp = x + t; elseif (a <= 2.5e-156) tmp = x * (y / z); elseif (a <= 1.05e-25) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e-100], N[(x + t), $MachinePrecision], If[LessEqual[a, 2.5e-156], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-25], t, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-100}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-156}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-25}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.0000000000000001e-100Initial program 83.8%
Taylor expanded in t around inf 70.0%
Taylor expanded in z around inf 40.3%
if -4.0000000000000001e-100 < a < 2.50000000000000004e-156Initial program 70.8%
+-commutative70.8%
fma-define70.8%
Simplified70.8%
Taylor expanded in x around -inf 52.8%
associate-*r*52.8%
neg-mul-152.8%
+-commutative52.8%
Simplified52.8%
Taylor expanded in a around 0 37.9%
associate-/l*42.2%
Simplified42.2%
if 2.50000000000000004e-156 < a < 1.05000000000000001e-25Initial program 88.0%
Taylor expanded in t around inf 59.8%
Taylor expanded in z around inf 29.0%
Taylor expanded in x around 0 42.2%
if 1.05000000000000001e-25 < a Initial program 91.3%
+-commutative91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in a around inf 50.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.2e+70) t (if (<= z 1.05e-22) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.2e+70) {
tmp = t;
} else if (z <= 1.05e-22) {
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 <= (-5.2d+70)) then
tmp = t
else if (z <= 1.05d-22) 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 <= -5.2e+70) {
tmp = t;
} else if (z <= 1.05e-22) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.2e+70: tmp = t elif z <= 1.05e-22: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.2e+70) tmp = t; elseif (z <= 1.05e-22) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.2e+70) tmp = t; elseif (z <= 1.05e-22) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.2e+70], t, If[LessEqual[z, 1.05e-22], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+70}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.2000000000000001e70 or 1.05000000000000004e-22 < z Initial program 69.6%
Taylor expanded in t around inf 56.2%
Taylor expanded in z around inf 36.0%
Taylor expanded in x around 0 46.6%
if -5.2000000000000001e70 < z < 1.05000000000000004e-22Initial program 92.0%
+-commutative92.0%
fma-define92.1%
Simplified92.1%
Taylor expanded in a around inf 36.4%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 82.6%
Taylor expanded in t around inf 63.8%
Taylor expanded in z around inf 33.4%
Taylor expanded in x around 0 24.5%
herbie shell --seed 2024163
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))