
(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 15 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 (/ 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}
Initial program 97.1%
associate-*l/82.3%
associate-/l*88.0%
Simplified88.0%
associate-*r/82.3%
associate-*l/97.1%
*-commutative97.1%
clear-num96.7%
un-div-inv97.4%
Applied egg-rr97.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (* t (/ x y)))))
(if (<= z -1.35e-53)
(/ t (/ z (- x y)))
(if (<= z 9.4e-26)
t_1
(if (<= z 5.3e+54)
(* t (/ y (- y z)))
(if (<= z 1.35e+58)
t_1
(if (<= z 3.5e+97) (/ t (/ (- z y) x)) (* t (/ (- x y) z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (z <= -1.35e-53) {
tmp = t / (z / (x - y));
} else if (z <= 9.4e-26) {
tmp = t_1;
} else if (z <= 5.3e+54) {
tmp = t * (y / (y - z));
} else if (z <= 1.35e+58) {
tmp = t_1;
} else if (z <= 3.5e+97) {
tmp = t / ((z - y) / x);
} else {
tmp = t * ((x - 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 = t - (t * (x / y))
if (z <= (-1.35d-53)) then
tmp = t / (z / (x - y))
else if (z <= 9.4d-26) then
tmp = t_1
else if (z <= 5.3d+54) then
tmp = t * (y / (y - z))
else if (z <= 1.35d+58) then
tmp = t_1
else if (z <= 3.5d+97) then
tmp = t / ((z - y) / x)
else
tmp = t * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (z <= -1.35e-53) {
tmp = t / (z / (x - y));
} else if (z <= 9.4e-26) {
tmp = t_1;
} else if (z <= 5.3e+54) {
tmp = t * (y / (y - z));
} else if (z <= 1.35e+58) {
tmp = t_1;
} else if (z <= 3.5e+97) {
tmp = t / ((z - y) / x);
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t * (x / y)) tmp = 0 if z <= -1.35e-53: tmp = t / (z / (x - y)) elif z <= 9.4e-26: tmp = t_1 elif z <= 5.3e+54: tmp = t * (y / (y - z)) elif z <= 1.35e+58: tmp = t_1 elif z <= 3.5e+97: tmp = t / ((z - y) / x) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (z <= -1.35e-53) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (z <= 9.4e-26) tmp = t_1; elseif (z <= 5.3e+54) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (z <= 1.35e+58) tmp = t_1; elseif (z <= 3.5e+97) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t * (x / y)); tmp = 0.0; if (z <= -1.35e-53) tmp = t / (z / (x - y)); elseif (z <= 9.4e-26) tmp = t_1; elseif (z <= 5.3e+54) tmp = t * (y / (y - z)); elseif (z <= 1.35e+58) tmp = t_1; elseif (z <= 3.5e+97) tmp = t / ((z - y) / x); else tmp = t * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-53], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.4e-26], t$95$1, If[LessEqual[z, 5.3e+54], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+58], t$95$1, If[LessEqual[z, 3.5e+97], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if z < -1.35e-53Initial program 99.7%
associate-*l/81.1%
associate-/l*86.3%
Simplified86.3%
associate-*r/81.1%
associate-*l/99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 79.3%
if -1.35e-53 < z < 9.39999999999999979e-26 or 5.30000000000000018e54 < z < 1.3500000000000001e58Initial program 95.9%
associate-*l/81.7%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in z around 0 78.1%
associate-*r/78.1%
neg-mul-178.1%
Simplified78.1%
Taylor expanded in x around 0 85.7%
mul-1-neg85.7%
unsub-neg85.7%
associate-/l*87.9%
Simplified87.9%
if 9.39999999999999979e-26 < z < 5.30000000000000018e54Initial program 100.0%
Taylor expanded in x around 0 87.3%
neg-mul-187.3%
distribute-neg-frac287.3%
Simplified87.3%
Taylor expanded in t around 0 68.9%
associate-/l*87.3%
Simplified87.3%
if 1.3500000000000001e58 < z < 3.5000000000000001e97Initial program 99.7%
associate-*l/99.7%
associate-/l*95.8%
Simplified95.8%
associate-*r/99.7%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 100.0%
if 3.5000000000000001e97 < z Initial program 95.4%
Taylor expanded in z around inf 87.2%
Final simplification85.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (* t (/ x y)))))
(if (<= z -3.4e-54)
(/ t (/ z (- x y)))
(if (<= z 8.5e-24)
t_1
(if (<= z 7.8e+52)
(* t (/ y (- y z)))
(if (<= z 3.3e+58)
t_1
(if (<= z 4e+97) (* t (/ x (- z y))) (* t (/ (- x y) z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (z <= -3.4e-54) {
tmp = t / (z / (x - y));
} else if (z <= 8.5e-24) {
tmp = t_1;
} else if (z <= 7.8e+52) {
tmp = t * (y / (y - z));
} else if (z <= 3.3e+58) {
tmp = t_1;
} else if (z <= 4e+97) {
tmp = t * (x / (z - y));
} else {
tmp = t * ((x - 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 = t - (t * (x / y))
if (z <= (-3.4d-54)) then
tmp = t / (z / (x - y))
else if (z <= 8.5d-24) then
tmp = t_1
else if (z <= 7.8d+52) then
tmp = t * (y / (y - z))
else if (z <= 3.3d+58) then
tmp = t_1
else if (z <= 4d+97) then
tmp = t * (x / (z - y))
else
tmp = t * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (z <= -3.4e-54) {
tmp = t / (z / (x - y));
} else if (z <= 8.5e-24) {
tmp = t_1;
} else if (z <= 7.8e+52) {
tmp = t * (y / (y - z));
} else if (z <= 3.3e+58) {
tmp = t_1;
} else if (z <= 4e+97) {
tmp = t * (x / (z - y));
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t * (x / y)) tmp = 0 if z <= -3.4e-54: tmp = t / (z / (x - y)) elif z <= 8.5e-24: tmp = t_1 elif z <= 7.8e+52: tmp = t * (y / (y - z)) elif z <= 3.3e+58: tmp = t_1 elif z <= 4e+97: tmp = t * (x / (z - y)) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (z <= -3.4e-54) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (z <= 8.5e-24) tmp = t_1; elseif (z <= 7.8e+52) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (z <= 3.3e+58) tmp = t_1; elseif (z <= 4e+97) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = Float64(t * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t * (x / y)); tmp = 0.0; if (z <= -3.4e-54) tmp = t / (z / (x - y)); elseif (z <= 8.5e-24) tmp = t_1; elseif (z <= 7.8e+52) tmp = t * (y / (y - z)); elseif (z <= 3.3e+58) tmp = t_1; elseif (z <= 4e+97) tmp = t * (x / (z - y)); else tmp = t * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.4e-54], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-24], t$95$1, If[LessEqual[z, 7.8e+52], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+58], t$95$1, If[LessEqual[z, 4e+97], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+52}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if z < -3.39999999999999987e-54Initial program 99.7%
associate-*l/81.1%
associate-/l*86.3%
Simplified86.3%
associate-*r/81.1%
associate-*l/99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 79.3%
if -3.39999999999999987e-54 < z < 8.5000000000000002e-24 or 7.7999999999999999e52 < z < 3.29999999999999983e58Initial program 95.9%
associate-*l/81.7%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in z around 0 78.1%
associate-*r/78.1%
neg-mul-178.1%
Simplified78.1%
Taylor expanded in x around 0 85.7%
mul-1-neg85.7%
unsub-neg85.7%
associate-/l*87.9%
Simplified87.9%
if 8.5000000000000002e-24 < z < 7.7999999999999999e52Initial program 100.0%
Taylor expanded in x around 0 87.3%
neg-mul-187.3%
distribute-neg-frac287.3%
Simplified87.3%
Taylor expanded in t around 0 68.9%
associate-/l*87.3%
Simplified87.3%
if 3.29999999999999983e58 < z < 4.0000000000000003e97Initial program 99.7%
Taylor expanded in x around inf 99.7%
if 4.0000000000000003e97 < z Initial program 95.4%
Taylor expanded in z around inf 87.2%
Final simplification85.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (* t (/ x y)))) (t_2 (* t (/ (- x y) z))))
(if (<= z -1e-55)
t_2
(if (<= z 4.5e-25)
t_1
(if (<= z 1.05e+54)
(* t (/ y (- y z)))
(if (<= z 1.92e+58)
t_1
(if (<= z 3.5e+97) (* t (/ x (- z y))) t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double t_2 = t * ((x - y) / z);
double tmp;
if (z <= -1e-55) {
tmp = t_2;
} else if (z <= 4.5e-25) {
tmp = t_1;
} else if (z <= 1.05e+54) {
tmp = t * (y / (y - z));
} else if (z <= 1.92e+58) {
tmp = t_1;
} else if (z <= 3.5e+97) {
tmp = t * (x / (z - y));
} 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 * (x / y))
t_2 = t * ((x - y) / z)
if (z <= (-1d-55)) then
tmp = t_2
else if (z <= 4.5d-25) then
tmp = t_1
else if (z <= 1.05d+54) then
tmp = t * (y / (y - z))
else if (z <= 1.92d+58) then
tmp = t_1
else if (z <= 3.5d+97) then
tmp = t * (x / (z - y))
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 * (x / y));
double t_2 = t * ((x - y) / z);
double tmp;
if (z <= -1e-55) {
tmp = t_2;
} else if (z <= 4.5e-25) {
tmp = t_1;
} else if (z <= 1.05e+54) {
tmp = t * (y / (y - z));
} else if (z <= 1.92e+58) {
tmp = t_1;
} else if (z <= 3.5e+97) {
tmp = t * (x / (z - y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t * (x / y)) t_2 = t * ((x - y) / z) tmp = 0 if z <= -1e-55: tmp = t_2 elif z <= 4.5e-25: tmp = t_1 elif z <= 1.05e+54: tmp = t * (y / (y - z)) elif z <= 1.92e+58: tmp = t_1 elif z <= 3.5e+97: tmp = t * (x / (z - y)) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t * Float64(x / y))) t_2 = Float64(t * Float64(Float64(x - y) / z)) tmp = 0.0 if (z <= -1e-55) tmp = t_2; elseif (z <= 4.5e-25) tmp = t_1; elseif (z <= 1.05e+54) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (z <= 1.92e+58) tmp = t_1; elseif (z <= 3.5e+97) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t * (x / y)); t_2 = t * ((x - y) / z); tmp = 0.0; if (z <= -1e-55) tmp = t_2; elseif (z <= 4.5e-25) tmp = t_1; elseif (z <= 1.05e+54) tmp = t * (y / (y - z)); elseif (z <= 1.92e+58) tmp = t_1; elseif (z <= 3.5e+97) tmp = t * (x / (z - y)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-55], t$95$2, If[LessEqual[z, 4.5e-25], t$95$1, If[LessEqual[z, 1.05e+54], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.92e+58], t$95$1, If[LessEqual[z, 3.5e+97], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
t_2 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;z \leq 1.92 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.99999999999999995e-56 or 3.5000000000000001e97 < z Initial program 97.9%
Taylor expanded in z around inf 82.6%
if -9.99999999999999995e-56 < z < 4.5000000000000001e-25 or 1.04999999999999993e54 < z < 1.92000000000000004e58Initial program 95.9%
associate-*l/81.7%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in z around 0 78.1%
associate-*r/78.1%
neg-mul-178.1%
Simplified78.1%
Taylor expanded in x around 0 85.7%
mul-1-neg85.7%
unsub-neg85.7%
associate-/l*87.9%
Simplified87.9%
if 4.5000000000000001e-25 < z < 1.04999999999999993e54Initial program 100.0%
Taylor expanded in x around 0 87.3%
neg-mul-187.3%
distribute-neg-frac287.3%
Simplified87.3%
Taylor expanded in t around 0 68.9%
associate-/l*87.3%
Simplified87.3%
if 1.92000000000000004e58 < z < 3.5000000000000001e97Initial program 99.7%
Taylor expanded in x around inf 99.7%
Final simplification85.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -3.4e-119)
t_1
(if (<= y -7.2e-140)
(/ (* t x) (- y))
(if (<= y -7e-140)
t
(if (<= y 1.05e-252)
(/ (* t x) z)
(if (<= y 1.8e+52) (* (- x y) (/ t z)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -3.4e-119) {
tmp = t_1;
} else if (y <= -7.2e-140) {
tmp = (t * x) / -y;
} else if (y <= -7e-140) {
tmp = t;
} else if (y <= 1.05e-252) {
tmp = (t * x) / z;
} else if (y <= 1.8e+52) {
tmp = (x - y) * (t / z);
} 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 * (y / (y - z))
if (y <= (-3.4d-119)) then
tmp = t_1
else if (y <= (-7.2d-140)) then
tmp = (t * x) / -y
else if (y <= (-7d-140)) then
tmp = t
else if (y <= 1.05d-252) then
tmp = (t * x) / z
else if (y <= 1.8d+52) then
tmp = (x - y) * (t / z)
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 * (y / (y - z));
double tmp;
if (y <= -3.4e-119) {
tmp = t_1;
} else if (y <= -7.2e-140) {
tmp = (t * x) / -y;
} else if (y <= -7e-140) {
tmp = t;
} else if (y <= 1.05e-252) {
tmp = (t * x) / z;
} else if (y <= 1.8e+52) {
tmp = (x - y) * (t / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -3.4e-119: tmp = t_1 elif y <= -7.2e-140: tmp = (t * x) / -y elif y <= -7e-140: tmp = t elif y <= 1.05e-252: tmp = (t * x) / z elif y <= 1.8e+52: tmp = (x - y) * (t / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -3.4e-119) tmp = t_1; elseif (y <= -7.2e-140) tmp = Float64(Float64(t * x) / Float64(-y)); elseif (y <= -7e-140) tmp = t; elseif (y <= 1.05e-252) tmp = Float64(Float64(t * x) / z); elseif (y <= 1.8e+52) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -3.4e-119) tmp = t_1; elseif (y <= -7.2e-140) tmp = (t * x) / -y; elseif (y <= -7e-140) tmp = t; elseif (y <= 1.05e-252) tmp = (t * x) / z; elseif (y <= 1.8e+52) tmp = (x - y) * (t / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e-119], t$95$1, If[LessEqual[y, -7.2e-140], N[(N[(t * x), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[y, -7e-140], t, If[LessEqual[y, 1.05e-252], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.8e+52], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-140}:\\
\;\;\;\;\frac{t \cdot x}{-y}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-140}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-252}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+52}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.40000000000000024e-119 or 1.8e52 < y Initial program 98.7%
Taylor expanded in x around 0 75.6%
neg-mul-175.6%
distribute-neg-frac275.6%
Simplified75.6%
Taylor expanded in t around 0 57.0%
associate-/l*75.6%
Simplified75.6%
if -3.40000000000000024e-119 < y < -7.2000000000000001e-140Initial program 99.7%
associate-*l/100.0%
associate-/l*99.7%
Simplified99.7%
associate-*r/100.0%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in z around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -7.2000000000000001e-140 < y < -6.9999999999999996e-140Initial program 100.0%
associate-*l/5.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
if -6.9999999999999996e-140 < y < 1.05e-252Initial program 93.8%
associate-*l/95.1%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around 0 88.1%
if 1.05e-252 < y < 1.8e52Initial program 95.5%
associate-*l/88.9%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
associate-/l*72.5%
Simplified72.5%
Final simplification77.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -2.85e-117)
t_1
(if (<= y -7.2e-140)
(/ (* t x) (- y))
(if (<= y -7e-140) t (if (<= y 1.8e-157) (/ t (/ z x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -2.85e-117) {
tmp = t_1;
} else if (y <= -7.2e-140) {
tmp = (t * x) / -y;
} else if (y <= -7e-140) {
tmp = t;
} else if (y <= 1.8e-157) {
tmp = t / (z / x);
} 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 * (y / (y - z))
if (y <= (-2.85d-117)) then
tmp = t_1
else if (y <= (-7.2d-140)) then
tmp = (t * x) / -y
else if (y <= (-7d-140)) then
tmp = t
else if (y <= 1.8d-157) then
tmp = t / (z / x)
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 * (y / (y - z));
double tmp;
if (y <= -2.85e-117) {
tmp = t_1;
} else if (y <= -7.2e-140) {
tmp = (t * x) / -y;
} else if (y <= -7e-140) {
tmp = t;
} else if (y <= 1.8e-157) {
tmp = t / (z / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -2.85e-117: tmp = t_1 elif y <= -7.2e-140: tmp = (t * x) / -y elif y <= -7e-140: tmp = t elif y <= 1.8e-157: tmp = t / (z / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -2.85e-117) tmp = t_1; elseif (y <= -7.2e-140) tmp = Float64(Float64(t * x) / Float64(-y)); elseif (y <= -7e-140) tmp = t; elseif (y <= 1.8e-157) tmp = Float64(t / Float64(z / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -2.85e-117) tmp = t_1; elseif (y <= -7.2e-140) tmp = (t * x) / -y; elseif (y <= -7e-140) tmp = t; elseif (y <= 1.8e-157) tmp = t / (z / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.85e-117], t$95$1, If[LessEqual[y, -7.2e-140], N[(N[(t * x), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[y, -7e-140], t, If[LessEqual[y, 1.8e-157], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-140}:\\
\;\;\;\;\frac{t \cdot x}{-y}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-140}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-157}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.85e-117 or 1.8e-157 < y Initial program 98.1%
Taylor expanded in x around 0 70.3%
neg-mul-170.3%
distribute-neg-frac270.3%
Simplified70.3%
Taylor expanded in t around 0 55.6%
associate-/l*70.3%
Simplified70.3%
if -2.85e-117 < y < -7.2000000000000001e-140Initial program 99.7%
associate-*l/100.0%
associate-/l*99.7%
Simplified99.7%
associate-*r/100.0%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in z around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -7.2000000000000001e-140 < y < -6.9999999999999996e-140Initial program 100.0%
associate-*l/5.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 100.0%
if -6.9999999999999996e-140 < y < 1.8e-157Initial program 93.9%
associate-*l/89.9%
associate-/l*94.1%
Simplified94.1%
associate-*r/89.9%
associate-*l/93.9%
*-commutative93.9%
clear-num93.8%
un-div-inv95.2%
Applied egg-rr95.2%
Taylor expanded in y around 0 84.7%
Final simplification74.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -7.2e-27)
t_1
(if (<= y 4.3e-153)
(* t (/ x (- z y)))
(if (<= y 2.8e+88) (* t (/ (- x y) z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -7.2e-27) {
tmp = t_1;
} else if (y <= 4.3e-153) {
tmp = t * (x / (z - y));
} else if (y <= 2.8e+88) {
tmp = t * ((x - y) / z);
} 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 * (y / (y - z))
if (y <= (-7.2d-27)) then
tmp = t_1
else if (y <= 4.3d-153) then
tmp = t * (x / (z - y))
else if (y <= 2.8d+88) then
tmp = t * ((x - y) / z)
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 * (y / (y - z));
double tmp;
if (y <= -7.2e-27) {
tmp = t_1;
} else if (y <= 4.3e-153) {
tmp = t * (x / (z - y));
} else if (y <= 2.8e+88) {
tmp = t * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -7.2e-27: tmp = t_1 elif y <= 4.3e-153: tmp = t * (x / (z - y)) elif y <= 2.8e+88: tmp = t * ((x - y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -7.2e-27) tmp = t_1; elseif (y <= 4.3e-153) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 2.8e+88) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -7.2e-27) tmp = t_1; elseif (y <= 4.3e-153) tmp = t * (x / (z - y)); elseif (y <= 2.8e+88) tmp = t * ((x - y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e-27], t$95$1, If[LessEqual[y, 4.3e-153], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+88], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-153}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+88}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.1999999999999997e-27 or 2.79999999999999989e88 < y Initial program 99.8%
Taylor expanded in x around 0 79.3%
neg-mul-179.3%
distribute-neg-frac279.3%
Simplified79.3%
Taylor expanded in t around 0 58.3%
associate-/l*79.3%
Simplified79.3%
if -7.1999999999999997e-27 < y < 4.3e-153Initial program 93.4%
Taylor expanded in x around inf 85.0%
if 4.3e-153 < y < 2.79999999999999989e88Initial program 97.3%
Taylor expanded in z around inf 73.2%
Final simplification80.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -4.1e-29)
t_1
(if (<= y 8.4e-153)
(* t (/ x (- z y)))
(if (<= y 1.8e+52) (* (- x y) (/ t z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -4.1e-29) {
tmp = t_1;
} else if (y <= 8.4e-153) {
tmp = t * (x / (z - y));
} else if (y <= 1.8e+52) {
tmp = (x - y) * (t / z);
} 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 * (y / (y - z))
if (y <= (-4.1d-29)) then
tmp = t_1
else if (y <= 8.4d-153) then
tmp = t * (x / (z - y))
else if (y <= 1.8d+52) then
tmp = (x - y) * (t / z)
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 * (y / (y - z));
double tmp;
if (y <= -4.1e-29) {
tmp = t_1;
} else if (y <= 8.4e-153) {
tmp = t * (x / (z - y));
} else if (y <= 1.8e+52) {
tmp = (x - y) * (t / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -4.1e-29: tmp = t_1 elif y <= 8.4e-153: tmp = t * (x / (z - y)) elif y <= 1.8e+52: tmp = (x - y) * (t / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -4.1e-29) tmp = t_1; elseif (y <= 8.4e-153) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1.8e+52) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -4.1e-29) tmp = t_1; elseif (y <= 8.4e-153) tmp = t * (x / (z - y)); elseif (y <= 1.8e+52) tmp = (x - y) * (t / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e-29], t$95$1, If[LessEqual[y, 8.4e-153], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+52], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{-153}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+52}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.0999999999999998e-29 or 1.8e52 < y Initial program 99.8%
Taylor expanded in x around 0 80.1%
neg-mul-180.1%
distribute-neg-frac280.1%
Simplified80.1%
Taylor expanded in t around 0 59.3%
associate-/l*80.1%
Simplified80.1%
if -4.0999999999999998e-29 < y < 8.40000000000000017e-153Initial program 93.4%
Taylor expanded in x around inf 85.0%
if 8.40000000000000017e-153 < y < 1.8e52Initial program 97.0%
associate-*l/94.5%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in z around inf 64.6%
*-commutative64.6%
associate-/l*69.3%
Simplified69.3%
Final simplification80.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.8e-5)
t
(if (<= y 5.1e-103)
(/ t (/ z x))
(if (<= y 5.4e+126) (* t (/ y (- z))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-5) {
tmp = t;
} else if (y <= 5.1e-103) {
tmp = t / (z / x);
} else if (y <= 5.4e+126) {
tmp = t * (y / -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.8d-5)) then
tmp = t
else if (y <= 5.1d-103) then
tmp = t / (z / x)
else if (y <= 5.4d+126) then
tmp = t * (y / -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.8e-5) {
tmp = t;
} else if (y <= 5.1e-103) {
tmp = t / (z / x);
} else if (y <= 5.4e+126) {
tmp = t * (y / -z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e-5: tmp = t elif y <= 5.1e-103: tmp = t / (z / x) elif y <= 5.4e+126: tmp = t * (y / -z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e-5) tmp = t; elseif (y <= 5.1e-103) tmp = Float64(t / Float64(z / x)); elseif (y <= 5.4e+126) tmp = Float64(t * Float64(y / Float64(-z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e-5) tmp = t; elseif (y <= 5.1e-103) tmp = t / (z / x); elseif (y <= 5.4e+126) tmp = t * (y / -z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e-5], t, If[LessEqual[y, 5.1e-103], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+126], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-5}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-103}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+126}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.79999999999999996e-5 or 5.40000000000000005e126 < y Initial program 99.9%
associate-*l/71.9%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in y around inf 68.6%
if -2.79999999999999996e-5 < y < 5.0999999999999998e-103Initial program 94.1%
associate-*l/90.0%
associate-/l*93.2%
Simplified93.2%
associate-*r/90.0%
associate-*l/94.1%
*-commutative94.1%
clear-num93.3%
un-div-inv94.1%
Applied egg-rr94.1%
Taylor expanded in y around 0 68.1%
if 5.0999999999999998e-103 < y < 5.40000000000000005e126Initial program 97.3%
associate-*l/90.7%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in z around inf 59.5%
*-commutative59.5%
associate-/l*64.7%
Simplified64.7%
Taylor expanded in x around 0 46.2%
mul-1-neg46.2%
associate-/l*50.6%
distribute-rgt-neg-in50.6%
Simplified50.6%
Final simplification65.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.1e-5) t (if (<= y 3.05e+91) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e-5) {
tmp = t;
} else if (y <= 3.05e+91) {
tmp = t / (z / x);
} 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.1d-5)) then
tmp = t
else if (y <= 3.05d+91) then
tmp = t / (z / x)
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.1e-5) {
tmp = t;
} else if (y <= 3.05e+91) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e-5: tmp = t elif y <= 3.05e+91: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e-5) tmp = t; elseif (y <= 3.05e+91) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e-5) tmp = t; elseif (y <= 3.05e+91) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e-5], t, If[LessEqual[y, 3.05e+91], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-5}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{+91}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.1e-5 or 3.05e91 < y Initial program 99.8%
associate-*l/72.7%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in y around inf 66.3%
if -1.1e-5 < y < 3.05e91Initial program 94.8%
associate-*l/90.4%
associate-/l*93.7%
Simplified93.7%
associate-*r/90.4%
associate-*l/94.8%
*-commutative94.8%
clear-num94.2%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in y around 0 60.0%
(FPCore (x y z t) :precision binary64 (if (<= y -3.4e-7) t (if (<= y 2.9e+91) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.4e-7) {
tmp = t;
} else if (y <= 2.9e+91) {
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 <= (-3.4d-7)) then
tmp = t
else if (y <= 2.9d+91) 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 <= -3.4e-7) {
tmp = t;
} else if (y <= 2.9e+91) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.4e-7: tmp = t elif y <= 2.9e+91: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.4e-7) tmp = t; elseif (y <= 2.9e+91) 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 <= -3.4e-7) tmp = t; elseif (y <= 2.9e+91) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.4e-7], t, If[LessEqual[y, 2.9e+91], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-7}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.39999999999999974e-7 or 2.90000000000000014e91 < y Initial program 99.8%
associate-*l/72.7%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in y around inf 66.3%
if -3.39999999999999974e-7 < y < 2.90000000000000014e91Initial program 94.8%
Taylor expanded in y around 0 59.8%
Final simplification62.8%
(FPCore (x y z t) :precision binary64 (if (<= y -5.8e-7) t (if (<= y 2.9e+91) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-7) {
tmp = t;
} else if (y <= 2.9e+91) {
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 <= (-5.8d-7)) then
tmp = t
else if (y <= 2.9d+91) 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 <= -5.8e-7) {
tmp = t;
} else if (y <= 2.9e+91) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e-7: tmp = t elif y <= 2.9e+91: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e-7) tmp = t; elseif (y <= 2.9e+91) 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 <= -5.8e-7) tmp = t; elseif (y <= 2.9e+91) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e-7], t, If[LessEqual[y, 2.9e+91], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-7}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.7999999999999995e-7 or 2.90000000000000014e91 < y Initial program 99.8%
associate-*l/72.7%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in y around inf 66.3%
if -5.7999999999999995e-7 < y < 2.90000000000000014e91Initial program 94.8%
associate-*l/90.4%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in y around 0 56.5%
*-commutative56.5%
associate-/l*58.5%
Simplified58.5%
(FPCore (x y z t) :precision binary64 (if (<= y -4e+166) (- t (* t (/ x y))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+166) {
tmp = t - (t * (x / y));
} else {
tmp = (x - y) * (t / (z - 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 <= (-4d+166)) then
tmp = t - (t * (x / y))
else
tmp = (x - y) * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+166) {
tmp = t - (t * (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4e+166: tmp = t - (t * (x / y)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4e+166) tmp = Float64(t - Float64(t * Float64(x / y))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4e+166) tmp = t - (t * (x / y)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4e+166], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+166}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -3.99999999999999976e166Initial program 99.9%
associate-*l/64.6%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in z around 0 64.5%
associate-*r/64.5%
neg-mul-164.5%
Simplified64.5%
Taylor expanded in x around 0 82.4%
mul-1-neg82.4%
unsub-neg82.4%
associate-/l*92.2%
Simplified92.2%
if -3.99999999999999976e166 < y Initial program 96.6%
associate-*l/85.3%
associate-/l*91.5%
Simplified91.5%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - 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 * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 97.1%
Final simplification97.1%
(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 97.1%
associate-*l/82.3%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in y around inf 35.3%
(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 2024100
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))