
(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 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(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-248) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -5e-248) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -5e-248) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / 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-248], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-248} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-248 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 76.8%
+-commutative76.8%
*-commutative76.8%
associate-/l*90.7%
fma-define90.7%
Simplified90.7%
if -5.0000000000000001e-248 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
+-commutative4.7%
*-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification91.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -5e-248)
t_1
(if (<= t_2 0.0)
(- t (/ (* (- t x) (- y a)) z))
(if (<= t_2 1e+223) t_2 t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-248) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 1e+223) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-5d-248)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t - (((t - x) * (y - a)) / z)
else if (t_2 <= 1d+223) then
tmp = t_2
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 t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -5e-248) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else if (t_2 <= 1e+223) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -5e-248: tmp = t_1 elif t_2 <= 0.0: tmp = t - (((t - x) * (y - a)) / z) elif t_2 <= 1e+223: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -5e-248) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); elseif (t_2 <= 1e+223) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -5e-248) tmp = t_1; elseif (t_2 <= 0.0) tmp = t - (((t - x) * (y - a)) / z); elseif (t_2 <= 1e+223) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-248], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+223], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 10^{+223}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-248 or 1.00000000000000005e223 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 70.9%
associate-/l*87.8%
Simplified87.8%
if -5.0000000000000001e-248 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.7%
+-commutative4.7%
*-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in z around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.00000000000000005e223Initial program 96.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) a))))
(if (<= a -3.1e+155)
x
(if (<= a -8.4e-128)
t_1
(if (<= a 1.25e-261)
t
(if (<= a 6.5e-211)
(* y (/ t (- a z)))
(if (<= a 3.5e+121) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (a <= -3.1e+155) {
tmp = x;
} else if (a <= -8.4e-128) {
tmp = t_1;
} else if (a <= 1.25e-261) {
tmp = t;
} else if (a <= 6.5e-211) {
tmp = y * (t / (a - z));
} else if (a <= 3.5e+121) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / a)
if (a <= (-3.1d+155)) then
tmp = x
else if (a <= (-8.4d-128)) then
tmp = t_1
else if (a <= 1.25d-261) then
tmp = t
else if (a <= 6.5d-211) then
tmp = y * (t / (a - z))
else if (a <= 3.5d+121) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (a <= -3.1e+155) {
tmp = x;
} else if (a <= -8.4e-128) {
tmp = t_1;
} else if (a <= 1.25e-261) {
tmp = t;
} else if (a <= 6.5e-211) {
tmp = y * (t / (a - z));
} else if (a <= 3.5e+121) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if a <= -3.1e+155: tmp = x elif a <= -8.4e-128: tmp = t_1 elif a <= 1.25e-261: tmp = t elif a <= 6.5e-211: tmp = y * (t / (a - z)) elif a <= 3.5e+121: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (a <= -3.1e+155) tmp = x; elseif (a <= -8.4e-128) tmp = t_1; elseif (a <= 1.25e-261) tmp = t; elseif (a <= 6.5e-211) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (a <= 3.5e+121) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (a <= -3.1e+155) tmp = x; elseif (a <= -8.4e-128) tmp = t_1; elseif (a <= 1.25e-261) tmp = t; elseif (a <= 6.5e-211) tmp = y * (t / (a - z)); elseif (a <= 3.5e+121) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+155], x, If[LessEqual[a, -8.4e-128], t$95$1, If[LessEqual[a, 1.25e-261], t, If[LessEqual[a, 6.5e-211], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+121], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -8.4 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-261}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-211}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.09999999999999989e155 or 3.5e121 < a Initial program 72.9%
+-commutative72.9%
*-commutative72.9%
associate-/l*91.5%
fma-define91.4%
Simplified91.4%
Taylor expanded in a around inf 59.2%
if -3.09999999999999989e155 < a < -8.4000000000000004e-128 or 6.4999999999999996e-211 < a < 3.5e121Initial program 75.4%
+-commutative75.4%
*-commutative75.4%
associate-/l*87.0%
fma-define87.0%
Simplified87.0%
add-cube-cbrt85.9%
pow385.9%
Applied egg-rr85.9%
Taylor expanded in y around inf 60.9%
div-sub61.7%
Simplified61.7%
Taylor expanded in a around inf 46.5%
if -8.4000000000000004e-128 < a < 1.24999999999999995e-261Initial program 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*77.8%
fma-define77.7%
Simplified77.7%
add-cube-cbrt76.3%
pow376.3%
Applied egg-rr76.3%
Taylor expanded in z around inf 44.1%
if 1.24999999999999995e-261 < a < 6.4999999999999996e-211Initial program 70.8%
+-commutative70.8%
*-commutative70.8%
associate-/l*82.5%
fma-define82.5%
Simplified82.5%
add-cube-cbrt82.4%
pow382.4%
Applied egg-rr82.4%
Taylor expanded in y around inf 91.2%
div-sub91.2%
Simplified91.2%
Taylor expanded in t around inf 65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ (- t x) a)))))
(if (<= a -2.55e-40)
t_2
(if (<= a 3.9e-224)
t_1
(if (<= a 2.5e-57)
(/ y (/ (- a z) (- t x)))
(if (<= a 1.3e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -2.55e-40) {
tmp = t_2;
} else if (a <= 3.9e-224) {
tmp = t_1;
} else if (a <= 2.5e-57) {
tmp = y / ((a - z) / (t - x));
} else if (a <= 1.3e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (y * ((t - x) / a))
if (a <= (-2.55d-40)) then
tmp = t_2
else if (a <= 3.9d-224) then
tmp = t_1
else if (a <= 2.5d-57) then
tmp = y / ((a - z) / (t - x))
else if (a <= 1.3d+69) then
tmp = t_1
else
tmp = t_2
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 t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -2.55e-40) {
tmp = t_2;
} else if (a <= 3.9e-224) {
tmp = t_1;
} else if (a <= 2.5e-57) {
tmp = y / ((a - z) / (t - x));
} else if (a <= 1.3e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (y * ((t - x) / a)) tmp = 0 if a <= -2.55e-40: tmp = t_2 elif a <= 3.9e-224: tmp = t_1 elif a <= 2.5e-57: tmp = y / ((a - z) / (t - x)) elif a <= 1.3e+69: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -2.55e-40) tmp = t_2; elseif (a <= 3.9e-224) tmp = t_1; elseif (a <= 2.5e-57) tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x))); elseif (a <= 1.3e+69) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (y * ((t - x) / a)); tmp = 0.0; if (a <= -2.55e-40) tmp = t_2; elseif (a <= 3.9e-224) tmp = t_1; elseif (a <= 2.5e-57) tmp = y / ((a - z) / (t - x)); elseif (a <= 1.3e+69) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.55e-40], t$95$2, If[LessEqual[a, 3.9e-224], t$95$1, If[LessEqual[a, 2.5e-57], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -2.55 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.55000000000000019e-40 or 1.3000000000000001e69 < a Initial program 74.6%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around 0 68.2%
associate-/l*76.0%
Simplified76.0%
if -2.55000000000000019e-40 < a < 3.8999999999999998e-224 or 2.5000000000000001e-57 < a < 1.3000000000000001e69Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*81.9%
fma-define81.8%
Simplified81.8%
add-cube-cbrt80.3%
pow380.3%
Applied egg-rr80.3%
Taylor expanded in t around inf 68.4%
div-sub68.4%
Simplified68.4%
if 3.8999999999999998e-224 < a < 2.5000000000000001e-57Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*81.2%
fma-define81.3%
Simplified81.3%
add-cube-cbrt80.7%
pow380.9%
Applied egg-rr80.9%
Taylor expanded in y around inf 85.7%
div-sub88.6%
Simplified88.6%
clear-num88.6%
un-div-inv88.6%
Applied egg-rr88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ (- t x) a)))))
(if (<= a -5.2e-40)
t_2
(if (<= a 3.9e-225)
t_1
(if (<= a 1.4e-58)
(* y (/ (- t x) (- a z)))
(if (<= a 3.2e+67) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -5.2e-40) {
tmp = t_2;
} else if (a <= 3.9e-225) {
tmp = t_1;
} else if (a <= 1.4e-58) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 3.2e+67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (y * ((t - x) / a))
if (a <= (-5.2d-40)) then
tmp = t_2
else if (a <= 3.9d-225) then
tmp = t_1
else if (a <= 1.4d-58) then
tmp = y * ((t - x) / (a - z))
else if (a <= 3.2d+67) then
tmp = t_1
else
tmp = t_2
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 t_2 = x + (y * ((t - x) / a));
double tmp;
if (a <= -5.2e-40) {
tmp = t_2;
} else if (a <= 3.9e-225) {
tmp = t_1;
} else if (a <= 1.4e-58) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 3.2e+67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (y * ((t - x) / a)) tmp = 0 if a <= -5.2e-40: tmp = t_2 elif a <= 3.9e-225: tmp = t_1 elif a <= 1.4e-58: tmp = y * ((t - x) / (a - z)) elif a <= 3.2e+67: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -5.2e-40) tmp = t_2; elseif (a <= 3.9e-225) tmp = t_1; elseif (a <= 1.4e-58) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 3.2e+67) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (y * ((t - x) / a)); tmp = 0.0; if (a <= -5.2e-40) tmp = t_2; elseif (a <= 3.9e-225) tmp = t_1; elseif (a <= 1.4e-58) tmp = y * ((t - x) / (a - z)); elseif (a <= 3.2e+67) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e-40], t$95$2, If[LessEqual[a, 3.9e-225], t$95$1, If[LessEqual[a, 1.4e-58], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+67], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -5.2000000000000003e-40 or 3.19999999999999983e67 < a Initial program 74.6%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around 0 68.2%
associate-/l*76.0%
Simplified76.0%
if -5.2000000000000003e-40 < a < 3.9e-225 or 1.4e-58 < a < 3.19999999999999983e67Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*81.9%
fma-define81.8%
Simplified81.8%
add-cube-cbrt80.3%
pow380.3%
Applied egg-rr80.3%
Taylor expanded in t around inf 68.4%
div-sub68.4%
Simplified68.4%
if 3.9e-225 < a < 1.4e-58Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*81.2%
fma-define81.3%
Simplified81.3%
add-cube-cbrt80.7%
pow380.9%
Applied egg-rr80.9%
Taylor expanded in y around inf 85.7%
div-sub88.6%
Simplified88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ (- y z) a)))))
(if (<= a -1.05e-35)
t_2
(if (<= a 1.28e-225)
t_1
(if (<= a 3.9e-52)
(* y (/ (- t x) (- a z)))
(if (<= a 7.6e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (t * ((y - z) / a));
double tmp;
if (a <= -1.05e-35) {
tmp = t_2;
} else if (a <= 1.28e-225) {
tmp = t_1;
} else if (a <= 3.9e-52) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 7.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (t * ((y - z) / a))
if (a <= (-1.05d-35)) then
tmp = t_2
else if (a <= 1.28d-225) then
tmp = t_1
else if (a <= 3.9d-52) then
tmp = y * ((t - x) / (a - z))
else if (a <= 7.6d+69) then
tmp = t_1
else
tmp = t_2
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 t_2 = x + (t * ((y - z) / a));
double tmp;
if (a <= -1.05e-35) {
tmp = t_2;
} else if (a <= 1.28e-225) {
tmp = t_1;
} else if (a <= 3.9e-52) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 7.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (t * ((y - z) / a)) tmp = 0 if a <= -1.05e-35: tmp = t_2 elif a <= 1.28e-225: tmp = t_1 elif a <= 3.9e-52: tmp = y * ((t - x) / (a - z)) elif a <= 7.6e+69: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(t * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -1.05e-35) tmp = t_2; elseif (a <= 1.28e-225) tmp = t_1; elseif (a <= 3.9e-52) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 7.6e+69) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (t * ((y - z) / a)); tmp = 0.0; if (a <= -1.05e-35) tmp = t_2; elseif (a <= 1.28e-225) tmp = t_1; elseif (a <= 3.9e-52) tmp = y * ((t - x) / (a - z)); elseif (a <= 7.6e+69) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e-35], t$95$2, If[LessEqual[a, 1.28e-225], t$95$1, If[LessEqual[a, 3.9e-52], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-52}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 7.6 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.05e-35 or 7.60000000000000055e69 < a Initial program 74.6%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around inf 70.4%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in a around inf 68.4%
associate-/l*72.4%
Simplified72.4%
if -1.05e-35 < a < 1.27999999999999993e-225 or 3.90000000000000018e-52 < a < 7.60000000000000055e69Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*81.9%
fma-define81.8%
Simplified81.8%
add-cube-cbrt80.3%
pow380.3%
Applied egg-rr80.3%
Taylor expanded in t around inf 68.4%
div-sub68.4%
Simplified68.4%
if 1.27999999999999993e-225 < a < 3.90000000000000018e-52Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*81.2%
fma-define81.3%
Simplified81.3%
add-cube-cbrt80.7%
pow380.9%
Applied egg-rr80.9%
Taylor expanded in y around inf 85.7%
div-sub88.6%
Simplified88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -2.25e-36)
t_2
(if (<= a 4.5e-225)
t_1
(if (<= a 3.1e-53)
(* y (/ (- t x) (- a z)))
(if (<= a 1.6e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -2.25e-36) {
tmp = t_2;
} else if (a <= 4.5e-225) {
tmp = t_1;
} else if (a <= 3.1e-53) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 1.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (t * (y / a))
if (a <= (-2.25d-36)) then
tmp = t_2
else if (a <= 4.5d-225) then
tmp = t_1
else if (a <= 3.1d-53) then
tmp = y * ((t - x) / (a - z))
else if (a <= 1.6d+69) then
tmp = t_1
else
tmp = t_2
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 t_2 = x + (t * (y / a));
double tmp;
if (a <= -2.25e-36) {
tmp = t_2;
} else if (a <= 4.5e-225) {
tmp = t_1;
} else if (a <= 3.1e-53) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 1.6e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (t * (y / a)) tmp = 0 if a <= -2.25e-36: tmp = t_2 elif a <= 4.5e-225: tmp = t_1 elif a <= 3.1e-53: tmp = y * ((t - x) / (a - z)) elif a <= 1.6e+69: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -2.25e-36) tmp = t_2; elseif (a <= 4.5e-225) tmp = t_1; elseif (a <= 3.1e-53) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 1.6e+69) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (t * (y / a)); tmp = 0.0; if (a <= -2.25e-36) tmp = t_2; elseif (a <= 4.5e-225) tmp = t_1; elseif (a <= 3.1e-53) tmp = y * ((t - x) / (a - z)); elseif (a <= 1.6e+69) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.25e-36], t$95$2, If[LessEqual[a, 4.5e-225], t$95$1, If[LessEqual[a, 3.1e-53], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.25 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-53}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.25000000000000012e-36 or 1.59999999999999992e69 < a Initial program 74.6%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around inf 70.4%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in z around 0 64.1%
associate-/l*67.2%
Simplified67.2%
if -2.25000000000000012e-36 < a < 4.5e-225 or 3.10000000000000015e-53 < a < 1.59999999999999992e69Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*81.9%
fma-define81.8%
Simplified81.8%
add-cube-cbrt80.3%
pow380.3%
Applied egg-rr80.3%
Taylor expanded in t around inf 68.4%
div-sub68.4%
Simplified68.4%
if 4.5e-225 < a < 3.10000000000000015e-53Initial program 77.7%
+-commutative77.7%
*-commutative77.7%
associate-/l*81.2%
fma-define81.3%
Simplified81.3%
add-cube-cbrt80.7%
pow380.9%
Applied egg-rr80.9%
Taylor expanded in y around inf 85.7%
div-sub88.6%
Simplified88.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.25e+252)
(- t (* (- x t) (/ a z)))
(if (<= z 1.35e+225)
(+ x (* (- y z) (/ (- t x) (- a z))))
(+ t (* a (/ (- t x) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.25e+252) {
tmp = t - ((x - t) * (a / z));
} else if (z <= 1.35e+225) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (a * ((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 (z <= (-3.25d+252)) then
tmp = t - ((x - t) * (a / z))
else if (z <= 1.35d+225) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else
tmp = t + (a * ((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 (z <= -3.25e+252) {
tmp = t - ((x - t) * (a / z));
} else if (z <= 1.35e+225) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (a * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.25e+252: tmp = t - ((x - t) * (a / z)) elif z <= 1.35e+225: tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (a * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.25e+252) tmp = Float64(t - Float64(Float64(x - t) * Float64(a / z))); elseif (z <= 1.35e+225) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.25e+252) tmp = t - ((x - t) * (a / z)); elseif (z <= 1.35e+225) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (a * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.25e+252], N[(t - N[(N[(x - t), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+225], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.25 \cdot 10^{+252}:\\
\;\;\;\;t - \left(x - t\right) \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+225}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if z < -3.25e252Initial program 11.5%
+-commutative11.5%
*-commutative11.5%
associate-/l*47.7%
fma-define47.7%
Simplified47.7%
Taylor expanded in y around 0 11.5%
mul-1-neg11.5%
associate-/l*43.5%
distribute-lft-neg-out43.5%
+-commutative43.5%
*-commutative43.5%
fma-define43.5%
Simplified43.5%
Taylor expanded in z around -inf 39.8%
mul-1-neg39.8%
unsub-neg39.8%
distribute-lft-out--41.2%
Simplified41.2%
*-commutative41.2%
*-un-lft-identity41.2%
times-frac74.3%
Applied egg-rr74.3%
if -3.25e252 < z < 1.3499999999999999e225Initial program 78.5%
associate-/l*87.4%
Simplified87.4%
if 1.3499999999999999e225 < z Initial program 36.1%
+-commutative36.1%
*-commutative36.1%
associate-/l*63.3%
fma-define62.9%
Simplified62.9%
Taylor expanded in y around 0 36.1%
mul-1-neg36.1%
associate-/l*46.3%
distribute-lft-neg-out46.3%
+-commutative46.3%
*-commutative46.3%
fma-define46.0%
Simplified46.0%
Taylor expanded in z around inf 83.9%
associate-/l*88.5%
Simplified88.5%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e-35) x (if (<= a 1.9e-262) t (if (<= a 3.1e+121) (* t (/ y (- a z))) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-35) {
tmp = x;
} else if (a <= 1.9e-262) {
tmp = t;
} else if (a <= 3.1e+121) {
tmp = t * (y / (a - z));
} 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 <= (-1.1d-35)) then
tmp = x
else if (a <= 1.9d-262) then
tmp = t
else if (a <= 3.1d+121) then
tmp = t * (y / (a - z))
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 <= -1.1e-35) {
tmp = x;
} else if (a <= 1.9e-262) {
tmp = t;
} else if (a <= 3.1e+121) {
tmp = t * (y / (a - z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e-35: tmp = x elif a <= 1.9e-262: tmp = t elif a <= 3.1e+121: tmp = t * (y / (a - z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-35) tmp = x; elseif (a <= 1.9e-262) tmp = t; elseif (a <= 3.1e+121) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.1e-35) tmp = x; elseif (a <= 1.9e-262) tmp = t; elseif (a <= 3.1e+121) tmp = t * (y / (a - z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-35], x, If[LessEqual[a, 1.9e-262], t, If[LessEqual[a, 3.1e+121], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-35}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-262}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+121}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.09999999999999997e-35 or 3.10000000000000008e121 < a Initial program 73.5%
+-commutative73.5%
*-commutative73.5%
associate-/l*90.6%
fma-define90.5%
Simplified90.5%
Taylor expanded in a around inf 49.2%
if -1.09999999999999997e-35 < a < 1.9000000000000001e-262Initial program 67.9%
+-commutative67.9%
*-commutative67.9%
associate-/l*76.2%
fma-define76.1%
Simplified76.1%
add-cube-cbrt74.7%
pow374.8%
Applied egg-rr74.8%
Taylor expanded in z around inf 38.1%
if 1.9000000000000001e-262 < a < 3.10000000000000008e121Initial program 77.1%
+-commutative77.1%
*-commutative77.1%
associate-/l*89.0%
fma-define89.0%
Simplified89.0%
add-cube-cbrt88.0%
pow388.1%
Applied egg-rr88.1%
Taylor expanded in y around inf 72.8%
div-sub74.0%
Simplified74.0%
Taylor expanded in t around inf 37.4%
associate-/l*42.5%
Simplified42.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.65e-37)
x
(if (<= a 2.25e-262)
t
(if (<= a 1.25e-54) (* x (/ y z)) (if (<= a 1.85e+68) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.65e-37) {
tmp = x;
} else if (a <= 2.25e-262) {
tmp = t;
} else if (a <= 1.25e-54) {
tmp = x * (y / z);
} else if (a <= 1.85e+68) {
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.65d-37)) then
tmp = x
else if (a <= 2.25d-262) then
tmp = t
else if (a <= 1.25d-54) then
tmp = x * (y / z)
else if (a <= 1.85d+68) 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.65e-37) {
tmp = x;
} else if (a <= 2.25e-262) {
tmp = t;
} else if (a <= 1.25e-54) {
tmp = x * (y / z);
} else if (a <= 1.85e+68) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.65e-37: tmp = x elif a <= 2.25e-262: tmp = t elif a <= 1.25e-54: tmp = x * (y / z) elif a <= 1.85e+68: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.65e-37) tmp = x; elseif (a <= 2.25e-262) tmp = t; elseif (a <= 1.25e-54) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.85e+68) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.65e-37) tmp = x; elseif (a <= 2.25e-262) tmp = t; elseif (a <= 1.25e-54) tmp = x * (y / z); elseif (a <= 1.85e+68) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.65e-37], x, If[LessEqual[a, 2.25e-262], t, If[LessEqual[a, 1.25e-54], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+68], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.65 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-262}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-54}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+68}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.6499999999999998e-37 or 1.84999999999999999e68 < a Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*91.5%
fma-define91.4%
Simplified91.4%
Taylor expanded in a around inf 47.5%
if -3.6499999999999998e-37 < a < 2.24999999999999999e-262 or 1.25000000000000004e-54 < a < 1.84999999999999999e68Initial program 69.7%
+-commutative69.7%
*-commutative69.7%
associate-/l*81.6%
fma-define81.4%
Simplified81.4%
add-cube-cbrt80.0%
pow379.9%
Applied egg-rr79.9%
Taylor expanded in z around inf 37.2%
if 2.24999999999999999e-262 < a < 1.25000000000000004e-54Initial program 76.9%
+-commutative76.9%
*-commutative76.9%
associate-/l*82.1%
fma-define82.2%
Simplified82.2%
add-cube-cbrt81.5%
pow381.7%
Applied egg-rr81.7%
Taylor expanded in y around inf 85.7%
div-sub88.2%
Simplified88.2%
Taylor expanded in t around 0 55.3%
mul-1-neg55.3%
associate-/l*57.6%
distribute-lft-neg-in57.6%
Simplified57.6%
Taylor expanded in a around 0 43.5%
associate-/l*48.1%
Simplified48.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+115) (not (<= y 2.4e+90))) (* y (/ (- t x) (- a z))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+115) || !(y <= 2.4e+90)) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-5.8d+115)) .or. (.not. (y <= 2.4d+90))) then
tmp = y * ((t - x) / (a - z))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+115) || !(y <= 2.4e+90)) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+115) or not (y <= 2.4e+90): tmp = y * ((t - x) / (a - z)) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+115) || !(y <= 2.4e+90)) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.8e+115) || ~((y <= 2.4e+90))) tmp = y * ((t - x) / (a - z)); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+115], N[Not[LessEqual[y, 2.4e+90]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+115} \lor \neg \left(y \leq 2.4 \cdot 10^{+90}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -5.80000000000000009e115 or 2.4000000000000001e90 < y Initial program 78.0%
+-commutative78.0%
*-commutative78.0%
associate-/l*91.3%
fma-define91.2%
Simplified91.2%
add-cube-cbrt90.4%
pow390.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 82.6%
div-sub82.6%
Simplified82.6%
if -5.80000000000000009e115 < y < 2.4000000000000001e90Initial program 70.4%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around inf 64.1%
associate-/l*73.1%
Simplified73.1%
Final simplification76.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -5.6e+116)
(* y (/ (- t x) (- a z)))
(if (<= y 19000000000.0)
(+ x (* t (/ (- y z) (- a z))))
(+ x (/ y (/ (- a z) (- t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.6e+116) {
tmp = y * ((t - x) / (a - z));
} else if (y <= 19000000000.0) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((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) :: tmp
if (y <= (-5.6d+116)) then
tmp = y * ((t - x) / (a - z))
else if (y <= 19000000000.0d0) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + (y / ((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 tmp;
if (y <= -5.6e+116) {
tmp = y * ((t - x) / (a - z));
} else if (y <= 19000000000.0) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.6e+116: tmp = y * ((t - x) / (a - z)) elif y <= 19000000000.0: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.6e+116) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (y <= 19000000000.0) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.6e+116) tmp = y * ((t - x) / (a - z)); elseif (y <= 19000000000.0) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.6e+116], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 19000000000.0], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;y \leq 19000000000:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if y < -5.60000000000000009e116Initial program 73.9%
+-commutative73.9%
*-commutative73.9%
associate-/l*91.0%
fma-define90.9%
Simplified90.9%
add-cube-cbrt89.8%
pow389.8%
Applied egg-rr89.8%
Taylor expanded in y around inf 87.5%
div-sub87.5%
Simplified87.5%
if -5.60000000000000009e116 < y < 1.9e10Initial program 69.3%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in t around inf 63.4%
associate-/l*72.9%
Simplified72.9%
if 1.9e10 < y Initial program 81.1%
associate-/l*91.4%
Simplified91.4%
clear-num91.4%
un-div-inv91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 87.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.4e-19) (not (<= x 2.3e+45))) (- x (* x (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.4e-19) || !(x <= 2.3e+45)) {
tmp = x - (x * (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-7.4d-19)) .or. (.not. (x <= 2.3d+45))) then
tmp = x - (x * (y / a))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.4e-19) || !(x <= 2.3e+45)) {
tmp = x - (x * (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.4e-19) or not (x <= 2.3e+45): tmp = x - (x * (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.4e-19) || !(x <= 2.3e+45)) tmp = Float64(x - Float64(x * Float64(y / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.4e-19) || ~((x <= 2.3e+45))) tmp = x - (x * (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.4e-19], N[Not[LessEqual[x, 2.3e+45]], $MachinePrecision]], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.4 \cdot 10^{-19} \lor \neg \left(x \leq 2.3 \cdot 10^{+45}\right):\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -7.40000000000000011e-19 or 2.30000000000000012e45 < x Initial program 64.3%
+-commutative64.3%
*-commutative64.3%
associate-/l*83.2%
fma-define83.1%
Simplified83.1%
add-cube-cbrt82.5%
pow382.5%
Applied egg-rr82.5%
Taylor expanded in t around 0 55.5%
mul-1-neg55.5%
unsub-neg55.5%
associate-/l*65.8%
Simplified65.8%
Taylor expanded in z around 0 53.2%
associate-/l*58.9%
Simplified58.9%
if -7.40000000000000011e-19 < x < 2.30000000000000012e45Initial program 82.2%
+-commutative82.2%
*-commutative82.2%
associate-/l*89.5%
fma-define89.5%
Simplified89.5%
add-cube-cbrt88.2%
pow388.3%
Applied egg-rr88.3%
Taylor expanded in t around inf 70.8%
div-sub70.8%
Simplified70.8%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1200000000.0) (not (<= z 8e+128))) (- t (/ (* x a) z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1200000000.0) || !(z <= 8e+128)) {
tmp = t - ((x * a) / z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1200000000.0d0)) .or. (.not. (z <= 8d+128))) then
tmp = t - ((x * a) / z)
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1200000000.0) || !(z <= 8e+128)) {
tmp = t - ((x * a) / z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1200000000.0) or not (z <= 8e+128): tmp = t - ((x * a) / z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1200000000.0) || !(z <= 8e+128)) tmp = Float64(t - Float64(Float64(x * a) / z)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1200000000.0) || ~((z <= 8e+128))) tmp = t - ((x * a) / z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1200000000.0], N[Not[LessEqual[z, 8e+128]], $MachinePrecision]], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1200000000 \lor \neg \left(z \leq 8 \cdot 10^{+128}\right):\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.2e9 or 8.0000000000000006e128 < z Initial program 39.2%
+-commutative39.2%
*-commutative39.2%
associate-/l*70.1%
fma-define70.0%
Simplified70.0%
Taylor expanded in y around 0 24.5%
mul-1-neg24.5%
associate-/l*42.6%
distribute-lft-neg-out42.6%
+-commutative42.6%
*-commutative42.6%
fma-define42.7%
Simplified42.7%
Taylor expanded in z around -inf 49.7%
mul-1-neg49.7%
unsub-neg49.7%
distribute-lft-out--50.1%
Simplified50.1%
Taylor expanded in x around inf 48.9%
*-commutative48.9%
Simplified48.9%
if -1.2e9 < z < 8.0000000000000006e128Initial program 91.9%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in t around inf 71.9%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in z around 0 57.1%
associate-/l*60.8%
Simplified60.8%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.4e+53) (+ t (* a (/ t z))) (if (<= z 9e+128) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.4e+53) {
tmp = t + (a * (t / z));
} else if (z <= 9e+128) {
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 <= (-5.4d+53)) then
tmp = t + (a * (t / z))
else if (z <= 9d+128) 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 <= -5.4e+53) {
tmp = t + (a * (t / z));
} else if (z <= 9e+128) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.4e+53: tmp = t + (a * (t / z)) elif z <= 9e+128: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.4e+53) tmp = Float64(t + Float64(a * Float64(t / z))); elseif (z <= 9e+128) 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 <= -5.4e+53) tmp = t + (a * (t / z)); elseif (z <= 9e+128) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+53], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+128], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+53}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+128}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.40000000000000039e53Initial program 33.6%
+-commutative33.6%
*-commutative33.6%
associate-/l*66.9%
fma-define66.9%
Simplified66.9%
Taylor expanded in y around 0 21.1%
mul-1-neg21.1%
associate-/l*44.9%
distribute-lft-neg-out44.9%
+-commutative44.9%
*-commutative44.9%
fma-define45.0%
Simplified45.0%
Taylor expanded in z around -inf 48.7%
mul-1-neg48.7%
unsub-neg48.7%
distribute-lft-out--49.3%
Simplified49.3%
Taylor expanded in x around 0 43.2%
sub-neg43.2%
mul-1-neg43.2%
remove-double-neg43.2%
associate-/l*46.2%
Simplified46.2%
if -5.40000000000000039e53 < z < 9.0000000000000003e128Initial program 91.0%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in t around inf 70.7%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in z around 0 55.5%
associate-/l*59.0%
Simplified59.0%
if 9.0000000000000003e128 < z Initial program 37.7%
+-commutative37.7%
*-commutative37.7%
associate-/l*73.7%
fma-define73.5%
Simplified73.5%
add-cube-cbrt72.2%
pow372.1%
Applied egg-rr72.1%
Taylor expanded in z around inf 49.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.5e-39) x (if (<= a 2.6e+68) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e-39) {
tmp = x;
} else if (a <= 2.6e+68) {
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.5d-39)) then
tmp = x
else if (a <= 2.6d+68) 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.5e-39) {
tmp = x;
} else if (a <= 2.6e+68) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e-39: tmp = x elif a <= 2.6e+68: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e-39) tmp = x; elseif (a <= 2.6e+68) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.5e-39) tmp = x; elseif (a <= 2.6e+68) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e-39], x, If[LessEqual[a, 2.6e+68], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-39}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+68}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.4999999999999999e-39 or 2.5999999999999998e68 < a Initial program 74.6%
+-commutative74.6%
*-commutative74.6%
associate-/l*91.5%
fma-define91.4%
Simplified91.4%
Taylor expanded in a around inf 47.5%
if -9.4999999999999999e-39 < a < 2.5999999999999998e68Initial program 71.9%
+-commutative71.9%
*-commutative71.9%
associate-/l*81.7%
fma-define81.7%
Simplified81.7%
add-cube-cbrt80.4%
pow380.5%
Applied egg-rr80.5%
Taylor expanded in z around inf 29.6%
(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 73.1%
+-commutative73.1%
*-commutative73.1%
associate-/l*86.3%
fma-define86.3%
Simplified86.3%
add-cube-cbrt85.3%
pow385.3%
Applied egg-rr85.3%
Taylor expanded in z around inf 19.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 73.1%
+-commutative73.1%
*-commutative73.1%
associate-/l*86.3%
fma-define86.3%
Simplified86.3%
add-cube-cbrt85.3%
pow385.3%
Applied egg-rr85.3%
Taylor expanded in t around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
associate-/l*46.8%
Simplified46.8%
Taylor expanded in z around inf 2.7%
Taylor expanded in x around 0 2.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))