
(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 9 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 (let* ((t_1 (/ (- x y) (- z y)))) (if (<= t_1 2e+131) (* t_1 t) (* x (/ (- t) (- y z))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) / (z - y);
double tmp;
if (t_1 <= 2e+131) {
tmp = t_1 * t;
} else {
tmp = x * (-t / (y - 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) :: t_1
real(8) :: tmp
t_1 = (x - y) / (z - y)
if (t_1 <= 2d+131) then
tmp = t_1 * t
else
tmp = x * (-t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) / (z - y);
double tmp;
if (t_1 <= 2e+131) {
tmp = t_1 * t;
} else {
tmp = x * (-t / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) / (z - y) tmp = 0 if t_1 <= 2e+131: tmp = t_1 * t else: tmp = x * (-t / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) / Float64(z - y)) tmp = 0.0 if (t_1 <= 2e+131) tmp = Float64(t_1 * t); else tmp = Float64(x * Float64(Float64(-t) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) / (z - y); tmp = 0.0; if (t_1 <= 2e+131) tmp = t_1 * t; else tmp = x * (-t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+131], N[(t$95$1 * t), $MachinePrecision], N[(x * N[((-t) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{z - y}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+131}:\\
\;\;\;\;t_1 \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-t}{y - z}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x y) (-.f64 z y)) < 1.9999999999999998e131Initial program 97.7%
if 1.9999999999999998e131 < (/.f64 (-.f64 x y) (-.f64 z y)) Initial program 75.7%
*-commutative75.7%
associate-*r/99.8%
associate-/l*77.4%
sub-neg77.4%
+-commutative77.4%
neg-sub077.4%
associate-+l-77.4%
sub0-neg77.4%
neg-mul-177.4%
associate-/r*77.4%
Simplified77.4%
Taylor expanded in x around inf 99.8%
*-commutative99.8%
associate-*r/99.8%
neg-mul-199.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Final simplification97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* y (/ t (- y z)))))
(if (<= y -2.65e+166)
t
(if (<= y -1.45e-74)
t_2
(if (<= y -3.9e-116)
t_1
(if (<= y -2.8e-121)
t
(if (<= y -9.5e-149)
(* x (/ (- t) y))
(if (<= y 3.9e-129)
t_1
(if (<= y 2.05e-51)
t_2
(if (<= y 7.8e-15) t_1 (if (<= y 5.1e+207) t_2 t)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = y * (t / (y - z));
double tmp;
if (y <= -2.65e+166) {
tmp = t;
} else if (y <= -1.45e-74) {
tmp = t_2;
} else if (y <= -3.9e-116) {
tmp = t_1;
} else if (y <= -2.8e-121) {
tmp = t;
} else if (y <= -9.5e-149) {
tmp = x * (-t / y);
} else if (y <= 3.9e-129) {
tmp = t_1;
} else if (y <= 2.05e-51) {
tmp = t_2;
} else if (y <= 7.8e-15) {
tmp = t_1;
} else if (y <= 5.1e+207) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x * (t / z)
t_2 = y * (t / (y - z))
if (y <= (-2.65d+166)) then
tmp = t
else if (y <= (-1.45d-74)) then
tmp = t_2
else if (y <= (-3.9d-116)) then
tmp = t_1
else if (y <= (-2.8d-121)) then
tmp = t
else if (y <= (-9.5d-149)) then
tmp = x * (-t / y)
else if (y <= 3.9d-129) then
tmp = t_1
else if (y <= 2.05d-51) then
tmp = t_2
else if (y <= 7.8d-15) then
tmp = t_1
else if (y <= 5.1d+207) then
tmp = t_2
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = y * (t / (y - z));
double tmp;
if (y <= -2.65e+166) {
tmp = t;
} else if (y <= -1.45e-74) {
tmp = t_2;
} else if (y <= -3.9e-116) {
tmp = t_1;
} else if (y <= -2.8e-121) {
tmp = t;
} else if (y <= -9.5e-149) {
tmp = x * (-t / y);
} else if (y <= 3.9e-129) {
tmp = t_1;
} else if (y <= 2.05e-51) {
tmp = t_2;
} else if (y <= 7.8e-15) {
tmp = t_1;
} else if (y <= 5.1e+207) {
tmp = t_2;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = y * (t / (y - z)) tmp = 0 if y <= -2.65e+166: tmp = t elif y <= -1.45e-74: tmp = t_2 elif y <= -3.9e-116: tmp = t_1 elif y <= -2.8e-121: tmp = t elif y <= -9.5e-149: tmp = x * (-t / y) elif y <= 3.9e-129: tmp = t_1 elif y <= 2.05e-51: tmp = t_2 elif y <= 7.8e-15: tmp = t_1 elif y <= 5.1e+207: tmp = t_2 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(y * Float64(t / Float64(y - z))) tmp = 0.0 if (y <= -2.65e+166) tmp = t; elseif (y <= -1.45e-74) tmp = t_2; elseif (y <= -3.9e-116) tmp = t_1; elseif (y <= -2.8e-121) tmp = t; elseif (y <= -9.5e-149) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 3.9e-129) tmp = t_1; elseif (y <= 2.05e-51) tmp = t_2; elseif (y <= 7.8e-15) tmp = t_1; elseif (y <= 5.1e+207) tmp = t_2; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = y * (t / (y - z)); tmp = 0.0; if (y <= -2.65e+166) tmp = t; elseif (y <= -1.45e-74) tmp = t_2; elseif (y <= -3.9e-116) tmp = t_1; elseif (y <= -2.8e-121) tmp = t; elseif (y <= -9.5e-149) tmp = x * (-t / y); elseif (y <= 3.9e-129) tmp = t_1; elseif (y <= 2.05e-51) tmp = t_2; elseif (y <= 7.8e-15) tmp = t_1; elseif (y <= 5.1e+207) tmp = t_2; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.65e+166], t, If[LessEqual[y, -1.45e-74], t$95$2, If[LessEqual[y, -3.9e-116], t$95$1, If[LessEqual[y, -2.8e-121], t, If[LessEqual[y, -9.5e-149], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e-129], t$95$1, If[LessEqual[y, 2.05e-51], t$95$2, If[LessEqual[y, 7.8e-15], t$95$1, If[LessEqual[y, 5.1e+207], t$95$2, t]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := y \cdot \frac{t}{y - z}\\
\mathbf{if}\;y \leq -2.65 \cdot 10^{+166}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-121}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-149}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-51}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{+207}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.65e166 or -3.9000000000000001e-116 < y < -2.8000000000000001e-121 or 5.0999999999999998e207 < y Initial program 99.9%
Taylor expanded in y around inf 89.9%
if -2.65e166 < y < -1.45e-74 or 3.9000000000000001e-129 < y < 2.04999999999999987e-51 or 7.80000000000000053e-15 < y < 5.0999999999999998e207Initial program 98.1%
*-commutative98.1%
associate-*r/87.1%
associate-/l*98.1%
sub-neg98.1%
+-commutative98.1%
neg-sub098.1%
associate-+l-98.1%
sub0-neg98.1%
neg-mul-198.1%
associate-/r*98.1%
Simplified98.1%
Taylor expanded in x around 0 58.6%
associate-*l/58.3%
*-commutative58.3%
Simplified58.3%
if -1.45e-74 < y < -3.9000000000000001e-116 or -9.50000000000000034e-149 < y < 3.9000000000000001e-129 or 2.04999999999999987e-51 < y < 7.80000000000000053e-15Initial program 92.7%
clear-num91.8%
associate-/r/92.6%
Applied egg-rr92.6%
Taylor expanded in y around 0 75.7%
associate-*l/79.2%
*-commutative79.2%
Simplified79.2%
if -2.8000000000000001e-121 < y < -9.50000000000000034e-149Initial program 63.1%
*-commutative63.1%
associate-*r/100.0%
associate-/l*70.1%
sub-neg70.1%
+-commutative70.1%
neg-sub070.1%
associate-+l-70.1%
sub0-neg70.1%
neg-mul-170.1%
associate-/r*70.1%
Simplified70.1%
Taylor expanded in z around 0 80.0%
Taylor expanded in y around 0 80.0%
mul-1-neg80.0%
unsub-neg80.0%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in y around 0 80.0%
mul-1-neg80.0%
associate-*l/80.0%
distribute-lft-neg-out80.0%
*-commutative80.0%
distribute-neg-frac80.0%
Simplified80.0%
Final simplification72.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (- t (/ t (/ y x)))))
(if (<= y -4.5e-39)
t_2
(if (<= y -3.9e-116)
t_1
(if (<= y -2.75e-148)
t_2
(if (<= y 1.12e-131)
t_1
(if (<= y 1.18e-51)
(* y (/ t (- y z)))
(if (<= y 8.6e-23) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = t - (t / (y / x));
double tmp;
if (y <= -4.5e-39) {
tmp = t_2;
} else if (y <= -3.9e-116) {
tmp = t_1;
} else if (y <= -2.75e-148) {
tmp = t_2;
} else if (y <= 1.12e-131) {
tmp = t_1;
} else if (y <= 1.18e-51) {
tmp = y * (t / (y - z));
} else if (y <= 8.6e-23) {
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 = x * (t / z)
t_2 = t - (t / (y / x))
if (y <= (-4.5d-39)) then
tmp = t_2
else if (y <= (-3.9d-116)) then
tmp = t_1
else if (y <= (-2.75d-148)) then
tmp = t_2
else if (y <= 1.12d-131) then
tmp = t_1
else if (y <= 1.18d-51) then
tmp = y * (t / (y - z))
else if (y <= 8.6d-23) 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 = x * (t / z);
double t_2 = t - (t / (y / x));
double tmp;
if (y <= -4.5e-39) {
tmp = t_2;
} else if (y <= -3.9e-116) {
tmp = t_1;
} else if (y <= -2.75e-148) {
tmp = t_2;
} else if (y <= 1.12e-131) {
tmp = t_1;
} else if (y <= 1.18e-51) {
tmp = y * (t / (y - z));
} else if (y <= 8.6e-23) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = t - (t / (y / x)) tmp = 0 if y <= -4.5e-39: tmp = t_2 elif y <= -3.9e-116: tmp = t_1 elif y <= -2.75e-148: tmp = t_2 elif y <= 1.12e-131: tmp = t_1 elif y <= 1.18e-51: tmp = y * (t / (y - z)) elif y <= 8.6e-23: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(t - Float64(t / Float64(y / x))) tmp = 0.0 if (y <= -4.5e-39) tmp = t_2; elseif (y <= -3.9e-116) tmp = t_1; elseif (y <= -2.75e-148) tmp = t_2; elseif (y <= 1.12e-131) tmp = t_1; elseif (y <= 1.18e-51) tmp = Float64(y * Float64(t / Float64(y - z))); elseif (y <= 8.6e-23) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = t - (t / (y / x)); tmp = 0.0; if (y <= -4.5e-39) tmp = t_2; elseif (y <= -3.9e-116) tmp = t_1; elseif (y <= -2.75e-148) tmp = t_2; elseif (y <= 1.12e-131) tmp = t_1; elseif (y <= 1.18e-51) tmp = y * (t / (y - z)); elseif (y <= 8.6e-23) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e-39], t$95$2, If[LessEqual[y, -3.9e-116], t$95$1, If[LessEqual[y, -2.75e-148], t$95$2, If[LessEqual[y, 1.12e-131], t$95$1, If[LessEqual[y, 1.18e-51], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e-23], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := t - \frac{t}{\frac{y}{x}}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{-148}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{-51}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.5000000000000001e-39 or -3.9000000000000001e-116 < y < -2.7500000000000001e-148 or 8.60000000000000004e-23 < y Initial program 98.7%
*-commutative98.7%
associate-*r/80.3%
associate-/l*98.9%
sub-neg98.9%
+-commutative98.9%
neg-sub098.9%
associate-+l-98.9%
sub0-neg98.9%
neg-mul-198.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in z around 0 58.1%
Taylor expanded in y around 0 68.5%
mul-1-neg68.5%
unsub-neg68.5%
associate-/l*72.5%
Simplified72.5%
if -4.5000000000000001e-39 < y < -3.9000000000000001e-116 or -2.7500000000000001e-148 < y < 1.12000000000000001e-131 or 1.18000000000000004e-51 < y < 8.60000000000000004e-23Initial program 93.0%
clear-num92.1%
associate-/r/92.8%
Applied egg-rr92.8%
Taylor expanded in y around 0 74.7%
associate-*l/78.0%
*-commutative78.0%
Simplified78.0%
if 1.12000000000000001e-131 < y < 1.18000000000000004e-51Initial program 87.4%
*-commutative87.4%
associate-*r/99.4%
associate-/l*87.4%
sub-neg87.4%
+-commutative87.4%
neg-sub087.4%
associate-+l-87.4%
sub0-neg87.4%
neg-mul-187.4%
associate-/r*87.4%
Simplified87.4%
Taylor expanded in x around 0 67.3%
associate-*l/67.6%
*-commutative67.6%
Simplified67.6%
Final simplification74.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (/ t (/ y x)))) (t_2 (/ t (/ z (- x y)))))
(if (<= z -3.8e+62)
t_2
(if (<= z -8.2e+30)
t_1
(if (<= z -2.25e-38)
t_2
(if (<= z 1.35e-132)
t_1
(if (<= z 5.5e-90)
(/ (* x t) z)
(if (<= z 420000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t / (y / x));
double t_2 = t / (z / (x - y));
double tmp;
if (z <= -3.8e+62) {
tmp = t_2;
} else if (z <= -8.2e+30) {
tmp = t_1;
} else if (z <= -2.25e-38) {
tmp = t_2;
} else if (z <= 1.35e-132) {
tmp = t_1;
} else if (z <= 5.5e-90) {
tmp = (x * t) / z;
} else if (z <= 420000000.0) {
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 - (t / (y / x))
t_2 = t / (z / (x - y))
if (z <= (-3.8d+62)) then
tmp = t_2
else if (z <= (-8.2d+30)) then
tmp = t_1
else if (z <= (-2.25d-38)) then
tmp = t_2
else if (z <= 1.35d-132) then
tmp = t_1
else if (z <= 5.5d-90) then
tmp = (x * t) / z
else if (z <= 420000000.0d0) 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 - (t / (y / x));
double t_2 = t / (z / (x - y));
double tmp;
if (z <= -3.8e+62) {
tmp = t_2;
} else if (z <= -8.2e+30) {
tmp = t_1;
} else if (z <= -2.25e-38) {
tmp = t_2;
} else if (z <= 1.35e-132) {
tmp = t_1;
} else if (z <= 5.5e-90) {
tmp = (x * t) / z;
} else if (z <= 420000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t / (y / x)) t_2 = t / (z / (x - y)) tmp = 0 if z <= -3.8e+62: tmp = t_2 elif z <= -8.2e+30: tmp = t_1 elif z <= -2.25e-38: tmp = t_2 elif z <= 1.35e-132: tmp = t_1 elif z <= 5.5e-90: tmp = (x * t) / z elif z <= 420000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t / Float64(y / x))) t_2 = Float64(t / Float64(z / Float64(x - y))) tmp = 0.0 if (z <= -3.8e+62) tmp = t_2; elseif (z <= -8.2e+30) tmp = t_1; elseif (z <= -2.25e-38) tmp = t_2; elseif (z <= 1.35e-132) tmp = t_1; elseif (z <= 5.5e-90) tmp = Float64(Float64(x * t) / z); elseif (z <= 420000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t / (y / x)); t_2 = t / (z / (x - y)); tmp = 0.0; if (z <= -3.8e+62) tmp = t_2; elseif (z <= -8.2e+30) tmp = t_1; elseif (z <= -2.25e-38) tmp = t_2; elseif (z <= 1.35e-132) tmp = t_1; elseif (z <= 5.5e-90) tmp = (x * t) / z; elseif (z <= 420000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+62], t$95$2, If[LessEqual[z, -8.2e+30], t$95$1, If[LessEqual[z, -2.25e-38], t$95$2, If[LessEqual[z, 1.35e-132], t$95$1, If[LessEqual[z, 5.5e-90], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 420000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t}{\frac{y}{x}}\\
t_2 := \frac{t}{\frac{z}{x - y}}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-90}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;z \leq 420000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.79999999999999984e62 or -8.20000000000000011e30 < z < -2.25000000000000004e-38 or 4.2e8 < z Initial program 97.2%
Taylor expanded in z around inf 70.9%
associate-/l*76.2%
Simplified76.2%
if -3.79999999999999984e62 < z < -8.20000000000000011e30 or -2.25000000000000004e-38 < z < 1.34999999999999995e-132 or 5.5000000000000003e-90 < z < 4.2e8Initial program 96.1%
*-commutative96.1%
associate-*r/83.3%
associate-/l*96.4%
sub-neg96.4%
+-commutative96.4%
neg-sub096.4%
associate-+l-96.4%
sub0-neg96.4%
neg-mul-196.4%
associate-/r*96.4%
Simplified96.4%
Taylor expanded in z around 0 73.7%
Taylor expanded in y around 0 83.5%
mul-1-neg83.5%
unsub-neg83.5%
associate-/l*85.5%
Simplified85.5%
if 1.34999999999999995e-132 < z < 5.5000000000000003e-90Initial program 76.4%
Taylor expanded in y around 0 87.1%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (- t (/ t (/ y x)))))
(if (<= z -2.7e+184)
t_1
(if (<= z -1.26e+29)
(/ t (/ (- y z) y))
(if (<= z -4.2e-38)
t_1
(if (<= z 1.35e-132)
t_2
(if (<= z 4.8e-90)
(/ (* x t) z)
(if (<= z 1500000000.0) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t - (t / (y / x));
double tmp;
if (z <= -2.7e+184) {
tmp = t_1;
} else if (z <= -1.26e+29) {
tmp = t / ((y - z) / y);
} else if (z <= -4.2e-38) {
tmp = t_1;
} else if (z <= 1.35e-132) {
tmp = t_2;
} else if (z <= 4.8e-90) {
tmp = (x * t) / z;
} else if (z <= 1500000000.0) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t / (z / (x - y))
t_2 = t - (t / (y / x))
if (z <= (-2.7d+184)) then
tmp = t_1
else if (z <= (-1.26d+29)) then
tmp = t / ((y - z) / y)
else if (z <= (-4.2d-38)) then
tmp = t_1
else if (z <= 1.35d-132) then
tmp = t_2
else if (z <= 4.8d-90) then
tmp = (x * t) / z
else if (z <= 1500000000.0d0) 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 t_1 = t / (z / (x - y));
double t_2 = t - (t / (y / x));
double tmp;
if (z <= -2.7e+184) {
tmp = t_1;
} else if (z <= -1.26e+29) {
tmp = t / ((y - z) / y);
} else if (z <= -4.2e-38) {
tmp = t_1;
} else if (z <= 1.35e-132) {
tmp = t_2;
} else if (z <= 4.8e-90) {
tmp = (x * t) / z;
} else if (z <= 1500000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t - (t / (y / x)) tmp = 0 if z <= -2.7e+184: tmp = t_1 elif z <= -1.26e+29: tmp = t / ((y - z) / y) elif z <= -4.2e-38: tmp = t_1 elif z <= 1.35e-132: tmp = t_2 elif z <= 4.8e-90: tmp = (x * t) / z elif z <= 1500000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t - Float64(t / Float64(y / x))) tmp = 0.0 if (z <= -2.7e+184) tmp = t_1; elseif (z <= -1.26e+29) tmp = Float64(t / Float64(Float64(y - z) / y)); elseif (z <= -4.2e-38) tmp = t_1; elseif (z <= 1.35e-132) tmp = t_2; elseif (z <= 4.8e-90) tmp = Float64(Float64(x * t) / z); elseif (z <= 1500000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t - (t / (y / x)); tmp = 0.0; if (z <= -2.7e+184) tmp = t_1; elseif (z <= -1.26e+29) tmp = t / ((y - z) / y); elseif (z <= -4.2e-38) tmp = t_1; elseif (z <= 1.35e-132) tmp = t_2; elseif (z <= 4.8e-90) tmp = (x * t) / z; elseif (z <= 1500000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+184], t$95$1, If[LessEqual[z, -1.26e+29], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-38], t$95$1, If[LessEqual[z, 1.35e-132], t$95$2, If[LessEqual[z, 4.8e-90], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1500000000.0], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := t - \frac{t}{\frac{y}{x}}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+184}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.26 \cdot 10^{+29}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-90}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;z \leq 1500000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.6999999999999999e184 or -1.26e29 < z < -4.20000000000000026e-38 or 1.5e9 < z Initial program 96.7%
Taylor expanded in z around inf 73.0%
associate-/l*79.5%
Simplified79.5%
if -2.6999999999999999e184 < z < -1.26e29Initial program 99.8%
*-commutative99.8%
associate-*r/85.6%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 73.9%
if -4.20000000000000026e-38 < z < 1.34999999999999995e-132 or 4.8000000000000003e-90 < z < 1.5e9Initial program 95.8%
*-commutative95.8%
associate-*r/85.3%
associate-/l*96.1%
sub-neg96.1%
+-commutative96.1%
neg-sub096.1%
associate-+l-96.1%
sub0-neg96.1%
neg-mul-196.1%
associate-/r*96.1%
Simplified96.1%
Taylor expanded in z around 0 74.9%
Taylor expanded in y around 0 83.9%
mul-1-neg83.9%
unsub-neg83.9%
associate-/l*85.2%
Simplified85.2%
if 1.34999999999999995e-132 < z < 4.8000000000000003e-90Initial program 76.4%
Taylor expanded in y around 0 87.1%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (- t (/ t (/ y x)))))
(if (<= z -4.2e+184)
t_1
(if (<= z -9.2e+46)
(/ t (/ (- y z) y))
(if (<= z -4.8e-47)
(/ t (/ (- z y) x))
(if (<= z 1.35e-132)
t_2
(if (<= z 4.8e-90)
(/ (* x t) z)
(if (<= z 700000000.0) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t - (t / (y / x));
double tmp;
if (z <= -4.2e+184) {
tmp = t_1;
} else if (z <= -9.2e+46) {
tmp = t / ((y - z) / y);
} else if (z <= -4.8e-47) {
tmp = t / ((z - y) / x);
} else if (z <= 1.35e-132) {
tmp = t_2;
} else if (z <= 4.8e-90) {
tmp = (x * t) / z;
} else if (z <= 700000000.0) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t / (z / (x - y))
t_2 = t - (t / (y / x))
if (z <= (-4.2d+184)) then
tmp = t_1
else if (z <= (-9.2d+46)) then
tmp = t / ((y - z) / y)
else if (z <= (-4.8d-47)) then
tmp = t / ((z - y) / x)
else if (z <= 1.35d-132) then
tmp = t_2
else if (z <= 4.8d-90) then
tmp = (x * t) / z
else if (z <= 700000000.0d0) 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 t_1 = t / (z / (x - y));
double t_2 = t - (t / (y / x));
double tmp;
if (z <= -4.2e+184) {
tmp = t_1;
} else if (z <= -9.2e+46) {
tmp = t / ((y - z) / y);
} else if (z <= -4.8e-47) {
tmp = t / ((z - y) / x);
} else if (z <= 1.35e-132) {
tmp = t_2;
} else if (z <= 4.8e-90) {
tmp = (x * t) / z;
} else if (z <= 700000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t - (t / (y / x)) tmp = 0 if z <= -4.2e+184: tmp = t_1 elif z <= -9.2e+46: tmp = t / ((y - z) / y) elif z <= -4.8e-47: tmp = t / ((z - y) / x) elif z <= 1.35e-132: tmp = t_2 elif z <= 4.8e-90: tmp = (x * t) / z elif z <= 700000000.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t - Float64(t / Float64(y / x))) tmp = 0.0 if (z <= -4.2e+184) tmp = t_1; elseif (z <= -9.2e+46) tmp = Float64(t / Float64(Float64(y - z) / y)); elseif (z <= -4.8e-47) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (z <= 1.35e-132) tmp = t_2; elseif (z <= 4.8e-90) tmp = Float64(Float64(x * t) / z); elseif (z <= 700000000.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t - (t / (y / x)); tmp = 0.0; if (z <= -4.2e+184) tmp = t_1; elseif (z <= -9.2e+46) tmp = t / ((y - z) / y); elseif (z <= -4.8e-47) tmp = t / ((z - y) / x); elseif (z <= 1.35e-132) tmp = t_2; elseif (z <= 4.8e-90) tmp = (x * t) / z; elseif (z <= 700000000.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+184], t$95$1, If[LessEqual[z, -9.2e+46], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-47], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-132], t$95$2, If[LessEqual[z, 4.8e-90], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 700000000.0], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := t - \frac{t}{\frac{y}{x}}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+184}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-90}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;z \leq 700000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.2e184 or 7e8 < z Initial program 96.3%
Taylor expanded in z around inf 72.4%
associate-/l*79.7%
Simplified79.7%
if -4.2e184 < z < -9.2000000000000002e46Initial program 99.7%
*-commutative99.7%
associate-*r/86.9%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 76.8%
if -9.2000000000000002e46 < z < -4.7999999999999999e-47Initial program 99.8%
Taylor expanded in x around inf 67.0%
associate-/l*73.6%
Simplified73.6%
if -4.7999999999999999e-47 < z < 1.34999999999999995e-132 or 4.8000000000000003e-90 < z < 7e8Initial program 95.8%
*-commutative95.8%
associate-*r/85.3%
associate-/l*96.1%
sub-neg96.1%
+-commutative96.1%
neg-sub096.1%
associate-+l-96.1%
sub0-neg96.1%
neg-mul-196.1%
associate-/r*96.1%
Simplified96.1%
Taylor expanded in z around 0 74.9%
Taylor expanded in y around 0 83.9%
mul-1-neg83.9%
unsub-neg83.9%
associate-/l*85.2%
Simplified85.2%
if 1.34999999999999995e-132 < z < 4.8000000000000003e-90Initial program 76.4%
Taylor expanded in y around 0 87.1%
Final simplification81.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- t) (- y z)))) (t_2 (* y (/ t (- y z)))))
(if (<= y -2.2e-38)
(/ t (/ (- y z) y))
(if (<= y -6.2e-96)
(/ (* (- x y) t) z)
(if (<= y 1.55e-84)
t_1
(if (<= y 3.2e-52)
t_2
(if (<= y 1.12e-5)
t_1
(if (<= y 1.36e+48) t_2 (- t (/ t (/ y x)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (-t / (y - z));
double t_2 = y * (t / (y - z));
double tmp;
if (y <= -2.2e-38) {
tmp = t / ((y - z) / y);
} else if (y <= -6.2e-96) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.55e-84) {
tmp = t_1;
} else if (y <= 3.2e-52) {
tmp = t_2;
} else if (y <= 1.12e-5) {
tmp = t_1;
} else if (y <= 1.36e+48) {
tmp = t_2;
} else {
tmp = t - (t / (y / x));
}
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 = x * (-t / (y - z))
t_2 = y * (t / (y - z))
if (y <= (-2.2d-38)) then
tmp = t / ((y - z) / y)
else if (y <= (-6.2d-96)) then
tmp = ((x - y) * t) / z
else if (y <= 1.55d-84) then
tmp = t_1
else if (y <= 3.2d-52) then
tmp = t_2
else if (y <= 1.12d-5) then
tmp = t_1
else if (y <= 1.36d+48) then
tmp = t_2
else
tmp = t - (t / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (-t / (y - z));
double t_2 = y * (t / (y - z));
double tmp;
if (y <= -2.2e-38) {
tmp = t / ((y - z) / y);
} else if (y <= -6.2e-96) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.55e-84) {
tmp = t_1;
} else if (y <= 3.2e-52) {
tmp = t_2;
} else if (y <= 1.12e-5) {
tmp = t_1;
} else if (y <= 1.36e+48) {
tmp = t_2;
} else {
tmp = t - (t / (y / x));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (-t / (y - z)) t_2 = y * (t / (y - z)) tmp = 0 if y <= -2.2e-38: tmp = t / ((y - z) / y) elif y <= -6.2e-96: tmp = ((x - y) * t) / z elif y <= 1.55e-84: tmp = t_1 elif y <= 3.2e-52: tmp = t_2 elif y <= 1.12e-5: tmp = t_1 elif y <= 1.36e+48: tmp = t_2 else: tmp = t - (t / (y / x)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(-t) / Float64(y - z))) t_2 = Float64(y * Float64(t / Float64(y - z))) tmp = 0.0 if (y <= -2.2e-38) tmp = Float64(t / Float64(Float64(y - z) / y)); elseif (y <= -6.2e-96) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 1.55e-84) tmp = t_1; elseif (y <= 3.2e-52) tmp = t_2; elseif (y <= 1.12e-5) tmp = t_1; elseif (y <= 1.36e+48) tmp = t_2; else tmp = Float64(t - Float64(t / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (-t / (y - z)); t_2 = y * (t / (y - z)); tmp = 0.0; if (y <= -2.2e-38) tmp = t / ((y - z) / y); elseif (y <= -6.2e-96) tmp = ((x - y) * t) / z; elseif (y <= 1.55e-84) tmp = t_1; elseif (y <= 3.2e-52) tmp = t_2; elseif (y <= 1.12e-5) tmp = t_1; elseif (y <= 1.36e+48) tmp = t_2; else tmp = t - (t / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[((-t) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e-38], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e-96], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.55e-84], t$95$1, If[LessEqual[y, 3.2e-52], t$95$2, If[LessEqual[y, 1.12e-5], t$95$1, If[LessEqual[y, 1.36e+48], t$95$2, N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{-t}{y - z}\\
t_2 := y \cdot \frac{t}{y - z}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{-38}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{+48}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < -2.20000000000000007e-38Initial program 99.8%
*-commutative99.8%
associate-*r/77.4%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 77.5%
if -2.20000000000000007e-38 < y < -6.1999999999999998e-96Initial program 93.8%
Taylor expanded in z around inf 95.5%
if -6.1999999999999998e-96 < y < 1.55000000000000001e-84 or 3.2000000000000001e-52 < y < 1.11999999999999995e-5Initial program 91.5%
*-commutative91.5%
associate-*r/91.0%
associate-/l*91.0%
sub-neg91.0%
+-commutative91.0%
neg-sub091.0%
associate-+l-91.0%
sub0-neg91.0%
neg-mul-191.0%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in x around inf 82.8%
*-commutative82.8%
associate-*r/85.8%
neg-mul-185.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
if 1.55000000000000001e-84 < y < 3.2000000000000001e-52 or 1.11999999999999995e-5 < y < 1.3599999999999999e48Initial program 95.2%
*-commutative95.2%
associate-*r/99.8%
associate-/l*95.0%
sub-neg95.0%
+-commutative95.0%
neg-sub095.0%
associate-+l-95.0%
sub0-neg95.0%
neg-mul-195.0%
associate-/r*95.0%
Simplified95.0%
Taylor expanded in x around 0 90.1%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if 1.3599999999999999e48 < y Initial program 99.8%
*-commutative99.8%
associate-*r/76.3%
associate-/l*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in z around 0 61.9%
Taylor expanded in y around 0 75.0%
mul-1-neg75.0%
unsub-neg75.0%
associate-/l*82.5%
Simplified82.5%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2.55e-39) t (if (<= y 4.7e-14) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.55e-39) {
tmp = t;
} else if (y <= 4.7e-14) {
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.55d-39)) then
tmp = t
else if (y <= 4.7d-14) 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.55e-39) {
tmp = t;
} else if (y <= 4.7e-14) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.55e-39: tmp = t elif y <= 4.7e-14: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.55e-39) tmp = t; elseif (y <= 4.7e-14) 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.55e-39) tmp = t; elseif (y <= 4.7e-14) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.55e-39], t, If[LessEqual[y, 4.7e-14], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.54999999999999994e-39 or 4.7000000000000002e-14 < y Initial program 99.8%
Taylor expanded in y around inf 57.4%
if -2.54999999999999994e-39 < y < 4.7000000000000002e-14Initial program 91.3%
clear-num90.5%
associate-/r/91.1%
Applied egg-rr91.1%
Taylor expanded in y around 0 63.6%
associate-*l/66.1%
*-commutative66.1%
Simplified66.1%
Final simplification61.2%
(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.1%
Taylor expanded in y around inf 37.7%
Final simplification37.7%
(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 2023271
(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))