
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 96.7%
Final simplification96.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))))
(if (<= x -860.0)
t_1
(if (<= x 3.4e-158)
(* t (/ y (- y z)))
(if (<= x 3e-137)
(* (- x y) (/ t z))
(if (<= x 2.15e-36) (/ (- t) (+ (/ z y) -1.0)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (x <= -860.0) {
tmp = t_1;
} else if (x <= 3.4e-158) {
tmp = t * (y / (y - z));
} else if (x <= 3e-137) {
tmp = (x - y) * (t / z);
} else if (x <= 2.15e-36) {
tmp = -t / ((z / y) + -1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (x / (z - y))
if (x <= (-860.0d0)) then
tmp = t_1
else if (x <= 3.4d-158) then
tmp = t * (y / (y - z))
else if (x <= 3d-137) then
tmp = (x - y) * (t / z)
else if (x <= 2.15d-36) then
tmp = -t / ((z / y) + (-1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (x <= -860.0) {
tmp = t_1;
} else if (x <= 3.4e-158) {
tmp = t * (y / (y - z));
} else if (x <= 3e-137) {
tmp = (x - y) * (t / z);
} else if (x <= 2.15e-36) {
tmp = -t / ((z / y) + -1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) tmp = 0 if x <= -860.0: tmp = t_1 elif x <= 3.4e-158: tmp = t * (y / (y - z)) elif x <= 3e-137: tmp = (x - y) * (t / z) elif x <= 2.15e-36: tmp = -t / ((z / y) + -1.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -860.0) tmp = t_1; elseif (x <= 3.4e-158) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (x <= 3e-137) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (x <= 2.15e-36) tmp = Float64(Float64(-t) / Float64(Float64(z / y) + -1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); tmp = 0.0; if (x <= -860.0) tmp = t_1; elseif (x <= 3.4e-158) tmp = t * (y / (y - z)); elseif (x <= 3e-137) tmp = (x - y) * (t / z); elseif (x <= 2.15e-36) tmp = -t / ((z / y) + -1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -860.0], t$95$1, If[LessEqual[x, 3.4e-158], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-137], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e-36], N[((-t) / N[(N[(z / y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -860:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-158}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-137}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-36}:\\
\;\;\;\;\frac{-t}{\frac{z}{y} + -1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -860 or 2.1500000000000001e-36 < x Initial program 98.4%
Taylor expanded in x around inf 76.4%
if -860 < x < 3.3999999999999999e-158Initial program 96.4%
associate-*l/85.1%
*-commutative85.1%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in x around 0 76.0%
mul-1-neg76.0%
distribute-neg-frac76.0%
*-commutative76.0%
distribute-lft-neg-out76.0%
Simplified76.0%
frac-2neg76.0%
div-inv75.9%
distribute-lft-neg-out75.9%
remove-double-neg75.9%
*-commutative75.9%
sub-neg75.9%
distribute-neg-in75.9%
add-sqr-sqrt33.3%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod27.1%
add-sqr-sqrt43.1%
add-sqr-sqrt15.9%
sqrt-unprod51.0%
sqr-neg51.0%
sqrt-unprod42.5%
add-sqr-sqrt75.9%
Applied egg-rr75.9%
associate-*l*87.7%
associate-*r/87.9%
*-rgt-identity87.9%
+-commutative87.9%
unsub-neg87.9%
Simplified87.9%
if 3.3999999999999999e-158 < x < 2.9999999999999998e-137Initial program 72.7%
associate-*l/77.0%
*-commutative77.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 86.2%
if 2.9999999999999998e-137 < x < 2.1500000000000001e-36Initial program 94.3%
associate-*l/83.7%
*-commutative83.7%
associate-*l/87.5%
Simplified87.5%
Taylor expanded in x around 0 66.8%
mul-1-neg66.8%
associate-/l*83.3%
distribute-neg-frac83.3%
div-sub83.3%
*-inverses83.3%
Simplified83.3%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x z))))
(if (<= y -2e+93)
t
(if (<= y -2.85e-43)
t_1
(if (<= y -7.1e-81)
t
(if (<= y -1.75e-207) (* x (/ t z)) (if (<= y 5e+97) t_1 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / z);
double tmp;
if (y <= -2e+93) {
tmp = t;
} else if (y <= -2.85e-43) {
tmp = t_1;
} else if (y <= -7.1e-81) {
tmp = t;
} else if (y <= -1.75e-207) {
tmp = x * (t / z);
} else if (y <= 5e+97) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (x / z)
if (y <= (-2d+93)) then
tmp = t
else if (y <= (-2.85d-43)) then
tmp = t_1
else if (y <= (-7.1d-81)) then
tmp = t
else if (y <= (-1.75d-207)) then
tmp = x * (t / z)
else if (y <= 5d+97) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / z);
double tmp;
if (y <= -2e+93) {
tmp = t;
} else if (y <= -2.85e-43) {
tmp = t_1;
} else if (y <= -7.1e-81) {
tmp = t;
} else if (y <= -1.75e-207) {
tmp = x * (t / z);
} else if (y <= 5e+97) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / z) tmp = 0 if y <= -2e+93: tmp = t elif y <= -2.85e-43: tmp = t_1 elif y <= -7.1e-81: tmp = t elif y <= -1.75e-207: tmp = x * (t / z) elif y <= 5e+97: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / z)) tmp = 0.0 if (y <= -2e+93) tmp = t; elseif (y <= -2.85e-43) tmp = t_1; elseif (y <= -7.1e-81) tmp = t; elseif (y <= -1.75e-207) tmp = Float64(x * Float64(t / z)); elseif (y <= 5e+97) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / z); tmp = 0.0; if (y <= -2e+93) tmp = t; elseif (y <= -2.85e-43) tmp = t_1; elseif (y <= -7.1e-81) tmp = t; elseif (y <= -1.75e-207) tmp = x * (t / z); elseif (y <= 5e+97) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+93], t, If[LessEqual[y, -2.85e-43], t$95$1, If[LessEqual[y, -7.1e-81], t, If[LessEqual[y, -1.75e-207], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+97], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -2 \cdot 10^{+93}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.85 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.1 \cdot 10^{-81}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-207}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.00000000000000009e93 or -2.85e-43 < y < -7.10000000000000019e-81 or 4.99999999999999999e97 < y Initial program 99.9%
associate-*l/70.1%
*-commutative70.1%
associate-*l/68.4%
Simplified68.4%
Taylor expanded in y around inf 68.7%
if -2.00000000000000009e93 < y < -2.85e-43 or -1.7500000000000001e-207 < y < 4.99999999999999999e97Initial program 97.3%
Taylor expanded in y around 0 61.0%
if -7.10000000000000019e-81 < y < -1.7500000000000001e-207Initial program 84.4%
associate-*l/87.9%
*-commutative87.9%
associate-*l/99.6%
Simplified99.6%
*-commutative99.6%
clear-num99.6%
div-inv99.6%
div-inv99.5%
associate-/r*84.1%
Applied egg-rr84.1%
Taylor expanded in y around 0 53.1%
associate-*l/55.9%
Simplified55.9%
Final simplification63.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.26e+94)
t
(if (<= y -2.8e-44)
(/ t (/ z x))
(if (<= y -7.1e-81)
t
(if (<= y -6.4e-208)
(* x (/ t z))
(if (<= y 1.66e+97) (* t (/ x z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.26e+94) {
tmp = t;
} else if (y <= -2.8e-44) {
tmp = t / (z / x);
} else if (y <= -7.1e-81) {
tmp = t;
} else if (y <= -6.4e-208) {
tmp = x * (t / z);
} else if (y <= 1.66e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.26d+94)) then
tmp = t
else if (y <= (-2.8d-44)) then
tmp = t / (z / x)
else if (y <= (-7.1d-81)) then
tmp = t
else if (y <= (-6.4d-208)) then
tmp = x * (t / z)
else if (y <= 1.66d+97) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.26e+94) {
tmp = t;
} else if (y <= -2.8e-44) {
tmp = t / (z / x);
} else if (y <= -7.1e-81) {
tmp = t;
} else if (y <= -6.4e-208) {
tmp = x * (t / z);
} else if (y <= 1.66e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.26e+94: tmp = t elif y <= -2.8e-44: tmp = t / (z / x) elif y <= -7.1e-81: tmp = t elif y <= -6.4e-208: tmp = x * (t / z) elif y <= 1.66e+97: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.26e+94) tmp = t; elseif (y <= -2.8e-44) tmp = Float64(t / Float64(z / x)); elseif (y <= -7.1e-81) tmp = t; elseif (y <= -6.4e-208) tmp = Float64(x * Float64(t / z)); elseif (y <= 1.66e+97) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.26e+94) tmp = t; elseif (y <= -2.8e-44) tmp = t / (z / x); elseif (y <= -7.1e-81) tmp = t; elseif (y <= -6.4e-208) tmp = x * (t / z); elseif (y <= 1.66e+97) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.26e+94], t, If[LessEqual[y, -2.8e-44], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.1e-81], t, If[LessEqual[y, -6.4e-208], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.66e+97], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.26 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -7.1 \cdot 10^{-81}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -6.4 \cdot 10^{-208}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.25999999999999997e94 or -2.8e-44 < y < -7.10000000000000019e-81 or 1.6599999999999999e97 < y Initial program 99.9%
associate-*l/70.1%
*-commutative70.1%
associate-*l/68.4%
Simplified68.4%
Taylor expanded in y around inf 68.7%
if -1.25999999999999997e94 < y < -2.8e-44Initial program 99.7%
associate-*l/92.5%
*-commutative92.5%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in y around 0 33.1%
associate-/l*40.4%
Simplified40.4%
if -7.10000000000000019e-81 < y < -6.4000000000000003e-208Initial program 84.4%
associate-*l/87.9%
*-commutative87.9%
associate-*l/99.6%
Simplified99.6%
*-commutative99.6%
clear-num99.6%
div-inv99.6%
div-inv99.5%
associate-/r*84.1%
Applied egg-rr84.1%
Taylor expanded in y around 0 53.1%
associate-*l/55.9%
Simplified55.9%
if -6.4000000000000003e-208 < y < 1.6599999999999999e97Initial program 96.8%
Taylor expanded in y around 0 65.9%
Final simplification63.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.82e+93)
t
(if (<= y -3.2e-44)
(/ t (/ z x))
(if (<= y -2.05e-82)
t
(if (<= y -1.3e-208)
(/ x (/ z t))
(if (<= y 1.8e+97) (* t (/ x z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.82e+93) {
tmp = t;
} else if (y <= -3.2e-44) {
tmp = t / (z / x);
} else if (y <= -2.05e-82) {
tmp = t;
} else if (y <= -1.3e-208) {
tmp = x / (z / t);
} else if (y <= 1.8e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.82d+93)) then
tmp = t
else if (y <= (-3.2d-44)) then
tmp = t / (z / x)
else if (y <= (-2.05d-82)) then
tmp = t
else if (y <= (-1.3d-208)) then
tmp = x / (z / t)
else if (y <= 1.8d+97) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.82e+93) {
tmp = t;
} else if (y <= -3.2e-44) {
tmp = t / (z / x);
} else if (y <= -2.05e-82) {
tmp = t;
} else if (y <= -1.3e-208) {
tmp = x / (z / t);
} else if (y <= 1.8e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.82e+93: tmp = t elif y <= -3.2e-44: tmp = t / (z / x) elif y <= -2.05e-82: tmp = t elif y <= -1.3e-208: tmp = x / (z / t) elif y <= 1.8e+97: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.82e+93) tmp = t; elseif (y <= -3.2e-44) tmp = Float64(t / Float64(z / x)); elseif (y <= -2.05e-82) tmp = t; elseif (y <= -1.3e-208) tmp = Float64(x / Float64(z / t)); elseif (y <= 1.8e+97) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.82e+93) tmp = t; elseif (y <= -3.2e-44) tmp = t / (z / x); elseif (y <= -2.05e-82) tmp = t; elseif (y <= -1.3e-208) tmp = x / (z / t); elseif (y <= 1.8e+97) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.82e+93], t, If[LessEqual[y, -3.2e-44], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.05e-82], t, If[LessEqual[y, -1.3e-208], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+97], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.82 \cdot 10^{+93}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-82}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-208}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.82000000000000009e93 or -3.19999999999999995e-44 < y < -2.04999999999999998e-82 or 1.79999999999999983e97 < y Initial program 99.9%
associate-*l/70.1%
*-commutative70.1%
associate-*l/68.4%
Simplified68.4%
Taylor expanded in y around inf 68.7%
if -1.82000000000000009e93 < y < -3.19999999999999995e-44Initial program 99.7%
associate-*l/92.5%
*-commutative92.5%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in y around 0 33.1%
associate-/l*40.4%
Simplified40.4%
if -2.04999999999999998e-82 < y < -1.30000000000000008e-208Initial program 84.4%
Taylor expanded in y around 0 49.7%
associate-/r/56.0%
Applied egg-rr56.0%
if -1.30000000000000008e-208 < y < 1.79999999999999983e97Initial program 96.8%
Taylor expanded in y around 0 65.9%
Final simplification63.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.12e+94)
t
(if (<= y -2.8e-42)
(/ t (/ z x))
(if (<= y -1.7e-102)
t
(if (<= y 9.2e-246)
(/ (* x t) z)
(if (<= y 1.66e+97) (* t (/ x z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.12e+94) {
tmp = t;
} else if (y <= -2.8e-42) {
tmp = t / (z / x);
} else if (y <= -1.7e-102) {
tmp = t;
} else if (y <= 9.2e-246) {
tmp = (x * t) / z;
} else if (y <= 1.66e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.12d+94)) then
tmp = t
else if (y <= (-2.8d-42)) then
tmp = t / (z / x)
else if (y <= (-1.7d-102)) then
tmp = t
else if (y <= 9.2d-246) then
tmp = (x * t) / z
else if (y <= 1.66d+97) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.12e+94) {
tmp = t;
} else if (y <= -2.8e-42) {
tmp = t / (z / x);
} else if (y <= -1.7e-102) {
tmp = t;
} else if (y <= 9.2e-246) {
tmp = (x * t) / z;
} else if (y <= 1.66e+97) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.12e+94: tmp = t elif y <= -2.8e-42: tmp = t / (z / x) elif y <= -1.7e-102: tmp = t elif y <= 9.2e-246: tmp = (x * t) / z elif y <= 1.66e+97: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.12e+94) tmp = t; elseif (y <= -2.8e-42) tmp = Float64(t / Float64(z / x)); elseif (y <= -1.7e-102) tmp = t; elseif (y <= 9.2e-246) tmp = Float64(Float64(x * t) / z); elseif (y <= 1.66e+97) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.12e+94) tmp = t; elseif (y <= -2.8e-42) tmp = t / (z / x); elseif (y <= -1.7e-102) tmp = t; elseif (y <= 9.2e-246) tmp = (x * t) / z; elseif (y <= 1.66e+97) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.12e+94], t, If[LessEqual[y, -2.8e-42], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-102], t, If[LessEqual[y, 9.2e-246], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.66e+97], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-42}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-102}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-246}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.11999999999999996e94 or -2.79999999999999998e-42 < y < -1.70000000000000006e-102 or 1.6599999999999999e97 < y Initial program 99.8%
associate-*l/69.2%
*-commutative69.2%
associate-*l/69.3%
Simplified69.3%
Taylor expanded in y around inf 67.7%
if -1.11999999999999996e94 < y < -2.79999999999999998e-42Initial program 99.7%
associate-*l/92.5%
*-commutative92.5%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in y around 0 33.1%
associate-/l*40.4%
Simplified40.4%
if -1.70000000000000006e-102 < y < 9.199999999999999e-246Initial program 89.5%
associate-*l/93.9%
*-commutative93.9%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in y around 0 71.5%
if 9.199999999999999e-246 < y < 1.6599999999999999e97Initial program 97.2%
Taylor expanded in y around 0 59.0%
Final simplification63.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.05e+85)
t
(if (<= y -1.7e-102)
(* (/ t y) (- x))
(if (<= y 4.8e-13)
(/ (* x t) z)
(if (<= y 3.2e+85)
(* t (/ (- y) z))
(if (<= y 1.66e+97) (* x (/ t z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.05e+85) {
tmp = t;
} else if (y <= -1.7e-102) {
tmp = (t / y) * -x;
} else if (y <= 4.8e-13) {
tmp = (x * t) / z;
} else if (y <= 3.2e+85) {
tmp = t * (-y / z);
} else if (y <= 1.66e+97) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.05d+85)) then
tmp = t
else if (y <= (-1.7d-102)) then
tmp = (t / y) * -x
else if (y <= 4.8d-13) then
tmp = (x * t) / z
else if (y <= 3.2d+85) then
tmp = t * (-y / z)
else if (y <= 1.66d+97) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.05e+85) {
tmp = t;
} else if (y <= -1.7e-102) {
tmp = (t / y) * -x;
} else if (y <= 4.8e-13) {
tmp = (x * t) / z;
} else if (y <= 3.2e+85) {
tmp = t * (-y / z);
} else if (y <= 1.66e+97) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.05e+85: tmp = t elif y <= -1.7e-102: tmp = (t / y) * -x elif y <= 4.8e-13: tmp = (x * t) / z elif y <= 3.2e+85: tmp = t * (-y / z) elif y <= 1.66e+97: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.05e+85) tmp = t; elseif (y <= -1.7e-102) tmp = Float64(Float64(t / y) * Float64(-x)); elseif (y <= 4.8e-13) tmp = Float64(Float64(x * t) / z); elseif (y <= 3.2e+85) tmp = Float64(t * Float64(Float64(-y) / z)); elseif (y <= 1.66e+97) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.05e+85) tmp = t; elseif (y <= -1.7e-102) tmp = (t / y) * -x; elseif (y <= 4.8e-13) tmp = (x * t) / z; elseif (y <= 3.2e+85) tmp = t * (-y / z); elseif (y <= 1.66e+97) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.05e+85], t, If[LessEqual[y, -1.7e-102], N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[y, 4.8e-13], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 3.2e+85], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.66e+97], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.05 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-102}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+85}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.04999999999999991e85 or 1.6599999999999999e97 < y Initial program 99.9%
associate-*l/67.7%
*-commutative67.7%
associate-*l/67.0%
Simplified67.0%
Taylor expanded in y around inf 69.7%
if -3.04999999999999991e85 < y < -1.70000000000000006e-102Initial program 99.6%
Taylor expanded in x around inf 58.3%
Taylor expanded in z around 0 44.3%
mul-1-neg44.3%
associate-*l/47.0%
*-commutative47.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
if -1.70000000000000006e-102 < y < 4.7999999999999997e-13Initial program 92.7%
associate-*l/94.1%
*-commutative94.1%
associate-*l/91.2%
Simplified91.2%
Taylor expanded in y around 0 70.8%
if 4.7999999999999997e-13 < y < 3.20000000000000018e85Initial program 99.8%
associate-/r/94.8%
Simplified94.8%
Taylor expanded in z around inf 44.1%
Taylor expanded in x around 0 38.9%
*-commutative38.9%
associate-*l/39.0%
neg-mul-139.0%
distribute-rgt-neg-in39.0%
Simplified39.0%
if 3.20000000000000018e85 < y < 1.6599999999999999e97Initial program 100.0%
associate-*l/99.2%
*-commutative99.2%
associate-*l/100.0%
Simplified100.0%
*-commutative100.0%
clear-num100.0%
div-inv100.0%
div-inv100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 99.2%
associate-*l/100.0%
Simplified100.0%
Final simplification65.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -2900.0)
t_2
(if (<= x 3.4e-158)
t_1
(if (<= x 4.8e-139) (* (- x y) (/ t z)) (if (<= x 5e-38) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2900.0) {
tmp = t_2;
} else if (x <= 3.4e-158) {
tmp = t_1;
} else if (x <= 4.8e-139) {
tmp = (x - y) * (t / z);
} else if (x <= 5e-38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-2900.0d0)) then
tmp = t_2
else if (x <= 3.4d-158) then
tmp = t_1
else if (x <= 4.8d-139) then
tmp = (x - y) * (t / z)
else if (x <= 5d-38) 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 t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2900.0) {
tmp = t_2;
} else if (x <= 3.4e-158) {
tmp = t_1;
} else if (x <= 4.8e-139) {
tmp = (x - y) * (t / z);
} else if (x <= 5e-38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -2900.0: tmp = t_2 elif x <= 3.4e-158: tmp = t_1 elif x <= 4.8e-139: tmp = (x - y) * (t / z) elif x <= 5e-38: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -2900.0) tmp = t_2; elseif (x <= 3.4e-158) tmp = t_1; elseif (x <= 4.8e-139) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (x <= 5e-38) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -2900.0) tmp = t_2; elseif (x <= 3.4e-158) tmp = t_1; elseif (x <= 4.8e-139) tmp = (x - y) * (t / z); elseif (x <= 5e-38) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2900.0], t$95$2, If[LessEqual[x, 3.4e-158], t$95$1, If[LessEqual[x, 4.8e-139], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e-38], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -2900:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -2900 or 5.00000000000000033e-38 < x Initial program 98.4%
Taylor expanded in x around inf 76.4%
if -2900 < x < 3.3999999999999999e-158 or 4.80000000000000029e-139 < x < 5.00000000000000033e-38Initial program 96.1%
associate-*l/84.9%
*-commutative84.9%
associate-*l/79.0%
Simplified79.0%
Taylor expanded in x around 0 74.6%
mul-1-neg74.6%
distribute-neg-frac74.6%
*-commutative74.6%
distribute-lft-neg-out74.6%
Simplified74.6%
frac-2neg74.6%
div-inv74.4%
distribute-lft-neg-out74.4%
remove-double-neg74.4%
*-commutative74.4%
sub-neg74.4%
distribute-neg-in74.4%
add-sqr-sqrt32.9%
sqrt-unprod50.7%
sqr-neg50.7%
sqrt-unprod24.8%
add-sqr-sqrt40.4%
add-sqr-sqrt15.5%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod41.4%
add-sqr-sqrt74.4%
Applied egg-rr74.4%
associate-*l*87.0%
associate-*r/87.1%
*-rgt-identity87.1%
+-commutative87.1%
unsub-neg87.1%
Simplified87.1%
if 3.3999999999999999e-158 < x < 4.80000000000000029e-139Initial program 72.7%
associate-*l/77.0%
*-commutative77.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around inf 86.2%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (<= y -4.6e+155) (* t (/ y (- y z))) (if (<= y 6.4e+156) (* (- x y) (/ t (- z y))) (* t (/ (- y x) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+155) {
tmp = t * (y / (y - z));
} else if (y <= 6.4e+156) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * ((y - x) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.6d+155)) then
tmp = t * (y / (y - z))
else if (y <= 6.4d+156) then
tmp = (x - y) * (t / (z - y))
else
tmp = t * ((y - x) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+155) {
tmp = t * (y / (y - z));
} else if (y <= 6.4e+156) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * ((y - x) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.6e+155: tmp = t * (y / (y - z)) elif y <= 6.4e+156: tmp = (x - y) * (t / (z - y)) else: tmp = t * ((y - x) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e+155) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 6.4e+156) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(Float64(y - x) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.6e+155) tmp = t * (y / (y - z)); elseif (y <= 6.4e+156) tmp = (x - y) * (t / (z - y)); else tmp = t * ((y - x) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e+155], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+156], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+155}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+156}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\end{array}
\end{array}
if y < -4.59999999999999996e155Initial program 99.9%
associate-*l/49.4%
*-commutative49.4%
associate-*l/69.2%
Simplified69.2%
Taylor expanded in x around 0 46.3%
mul-1-neg46.3%
distribute-neg-frac46.3%
*-commutative46.3%
distribute-lft-neg-out46.3%
Simplified46.3%
frac-2neg46.3%
div-inv46.2%
distribute-lft-neg-out46.2%
remove-double-neg46.2%
*-commutative46.2%
sub-neg46.2%
distribute-neg-in46.2%
add-sqr-sqrt45.9%
sqrt-unprod2.3%
sqr-neg2.3%
sqrt-unprod0.0%
add-sqr-sqrt5.3%
add-sqr-sqrt5.3%
sqrt-unprod2.3%
sqr-neg2.3%
sqrt-unprod0.0%
add-sqr-sqrt46.2%
Applied egg-rr46.2%
associate-*l*96.6%
associate-*r/96.8%
*-rgt-identity96.8%
+-commutative96.8%
unsub-neg96.8%
Simplified96.8%
if -4.59999999999999996e155 < y < 6.40000000000000005e156Initial program 95.8%
associate-*l/91.9%
*-commutative91.9%
associate-*l/90.4%
Simplified90.4%
if 6.40000000000000005e156 < y Initial program 99.9%
Taylor expanded in z around 0 92.1%
associate-*r/92.1%
neg-mul-192.1%
Simplified92.1%
Final simplification91.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e+81)
t
(if (<= y -1.7e-102)
(* (/ t y) (- x))
(if (<= y 2.3e+97) (/ (* x t) z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+81) {
tmp = t;
} else if (y <= -1.7e-102) {
tmp = (t / y) * -x;
} else if (y <= 2.3e+97) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8d+81)) then
tmp = t
else if (y <= (-1.7d-102)) then
tmp = (t / y) * -x
else if (y <= 2.3d+97) then
tmp = (x * t) / z
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+81) {
tmp = t;
} else if (y <= -1.7e-102) {
tmp = (t / y) * -x;
} else if (y <= 2.3e+97) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e+81: tmp = t elif y <= -1.7e-102: tmp = (t / y) * -x elif y <= 2.3e+97: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e+81) tmp = t; elseif (y <= -1.7e-102) tmp = Float64(Float64(t / y) * Float64(-x)); elseif (y <= 2.3e+97) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e+81) tmp = t; elseif (y <= -1.7e-102) tmp = (t / y) * -x; elseif (y <= 2.3e+97) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e+81], t, If[LessEqual[y, -1.7e-102], N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[y, 2.3e+97], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+81}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-102}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+97}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.99999999999999937e81 or 2.30000000000000006e97 < y Initial program 99.9%
associate-*l/67.7%
*-commutative67.7%
associate-*l/67.0%
Simplified67.0%
Taylor expanded in y around inf 69.7%
if -7.99999999999999937e81 < y < -1.70000000000000006e-102Initial program 99.6%
Taylor expanded in x around inf 58.3%
Taylor expanded in z around 0 44.3%
mul-1-neg44.3%
associate-*l/47.0%
*-commutative47.0%
distribute-rgt-neg-in47.0%
distribute-neg-frac47.0%
Simplified47.0%
if -1.70000000000000006e-102 < y < 2.30000000000000006e97Initial program 93.8%
associate-*l/95.0%
*-commutative95.0%
associate-*l/91.9%
Simplified91.9%
Taylor expanded in y around 0 63.1%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.85e-103) (not (<= y 2.7e-14))) (* t (/ y (- y z))) (/ (* x t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.85e-103) || !(y <= 2.7e-14)) {
tmp = t * (y / (y - z));
} else {
tmp = (x * t) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.85d-103)) .or. (.not. (y <= 2.7d-14))) then
tmp = t * (y / (y - z))
else
tmp = (x * t) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.85e-103) || !(y <= 2.7e-14)) {
tmp = t * (y / (y - z));
} else {
tmp = (x * t) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.85e-103) or not (y <= 2.7e-14): tmp = t * (y / (y - z)) else: tmp = (x * t) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.85e-103) || !(y <= 2.7e-14)) tmp = Float64(t * Float64(y / Float64(y - z))); else tmp = Float64(Float64(x * t) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.85e-103) || ~((y <= 2.7e-14))) tmp = t * (y / (y - z)); else tmp = (x * t) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.85e-103], N[Not[LessEqual[y, 2.7e-14]], $MachinePrecision]], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-103} \lor \neg \left(y \leq 2.7 \cdot 10^{-14}\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\end{array}
\end{array}
if y < -1.85e-103 or 2.6999999999999999e-14 < y Initial program 99.8%
associate-*l/77.6%
*-commutative77.6%
associate-*l/77.3%
Simplified77.3%
Taylor expanded in x around 0 51.9%
mul-1-neg51.9%
distribute-neg-frac51.9%
*-commutative51.9%
distribute-lft-neg-out51.9%
Simplified51.9%
frac-2neg51.9%
div-inv51.8%
distribute-lft-neg-out51.8%
remove-double-neg51.8%
*-commutative51.8%
sub-neg51.8%
distribute-neg-in51.8%
add-sqr-sqrt27.9%
sqrt-unprod25.7%
sqr-neg25.7%
sqrt-unprod9.1%
add-sqr-sqrt17.5%
add-sqr-sqrt8.3%
sqrt-unprod22.2%
sqr-neg22.2%
sqrt-unprod23.7%
add-sqr-sqrt51.8%
Applied egg-rr51.8%
associate-*l*69.4%
associate-*r/69.6%
*-rgt-identity69.6%
+-commutative69.6%
unsub-neg69.6%
Simplified69.6%
if -1.85e-103 < y < 2.6999999999999999e-14Initial program 92.7%
associate-*l/94.1%
*-commutative94.1%
associate-*l/91.2%
Simplified91.2%
Taylor expanded in y around 0 70.8%
Final simplification70.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7e-81) (not (<= y 4.8e-13))) (* t (/ y (- y z))) (* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-81) || !(y <= 4.8e-13)) {
tmp = t * (y / (y - z));
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7d-81)) .or. (.not. (y <= 4.8d-13))) then
tmp = t * (y / (y - z))
else
tmp = (x - y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7e-81) || !(y <= 4.8e-13)) {
tmp = t * (y / (y - z));
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7e-81) or not (y <= 4.8e-13): tmp = t * (y / (y - z)) else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7e-81) || !(y <= 4.8e-13)) tmp = Float64(t * Float64(y / Float64(y - z))); else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7e-81) || ~((y <= 4.8e-13))) tmp = t * (y / (y - z)); else tmp = (x - y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7e-81], N[Not[LessEqual[y, 4.8e-13]], $MachinePrecision]], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-81} \lor \neg \left(y \leq 4.8 \cdot 10^{-13}\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -6.99999999999999973e-81 or 4.7999999999999997e-13 < y Initial program 99.8%
associate-*l/78.4%
*-commutative78.4%
associate-*l/76.8%
Simplified76.8%
Taylor expanded in x around 0 52.9%
mul-1-neg52.9%
distribute-neg-frac52.9%
*-commutative52.9%
distribute-lft-neg-out52.9%
Simplified52.9%
frac-2neg52.9%
div-inv52.7%
distribute-lft-neg-out52.7%
remove-double-neg52.7%
*-commutative52.7%
sub-neg52.7%
distribute-neg-in52.7%
add-sqr-sqrt28.4%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod9.3%
add-sqr-sqrt17.8%
add-sqr-sqrt8.4%
sqrt-unprod22.5%
sqr-neg22.5%
sqrt-unprod24.2%
add-sqr-sqrt52.7%
Applied egg-rr52.7%
associate-*l*70.1%
associate-*r/70.3%
*-rgt-identity70.3%
+-commutative70.3%
unsub-neg70.3%
Simplified70.3%
if -6.99999999999999973e-81 < y < 4.7999999999999997e-13Initial program 92.8%
associate-*l/92.6%
*-commutative92.6%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in z around inf 77.9%
Final simplification73.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.65e+93) t (if (<= y 1.66e+97) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.65e+93) {
tmp = t;
} else if (y <= 1.66e+97) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.65d+93)) then
tmp = t
else if (y <= 1.66d+97) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.65e+93) {
tmp = t;
} else if (y <= 1.66e+97) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.65e+93: tmp = t elif y <= 1.66e+97: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.65e+93) tmp = t; elseif (y <= 1.66e+97) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.65e+93) tmp = t; elseif (y <= 1.66e+97) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.65e+93], t, If[LessEqual[y, 1.66e+97], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{+93}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.66 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.6500000000000002e93 or 1.6599999999999999e97 < y Initial program 99.9%
associate-*l/68.4%
*-commutative68.4%
associate-*l/66.6%
Simplified66.6%
Taylor expanded in y around inf 70.5%
if -2.6500000000000002e93 < y < 1.6599999999999999e97Initial program 95.1%
associate-*l/93.3%
*-commutative93.3%
associate-*l/92.1%
Simplified92.1%
*-commutative92.1%
clear-num91.5%
div-inv92.1%
div-inv92.0%
associate-/r*94.9%
Applied egg-rr94.9%
Taylor expanded in y around 0 54.9%
associate-*l/54.0%
Simplified54.0%
Final simplification59.7%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 96.7%
associate-*l/84.7%
*-commutative84.7%
associate-*l/83.3%
Simplified83.3%
Taylor expanded in y around inf 33.5%
Final simplification33.5%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2023318
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))