
(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 12 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 97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* (- x y) t) z)))
(if (<= y -1.02e+32)
(* t (- 1.0 (/ x y)))
(if (<= y -4.8e-79)
t_1
(if (<= y 1.65e-60)
(* x (/ t (- z y)))
(if (<= y 7e+36)
(* y (/ t (- y z)))
(if (<= y 6.4e+47)
t_1
(if (<= y 5.6e+207)
(* t (/ (- y x) y))
(* t (/ y (- y z)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = ((x - y) * t) / z;
double tmp;
if (y <= -1.02e+32) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.8e-79) {
tmp = t_1;
} else if (y <= 1.65e-60) {
tmp = x * (t / (z - y));
} else if (y <= 7e+36) {
tmp = y * (t / (y - z));
} else if (y <= 6.4e+47) {
tmp = t_1;
} else if (y <= 5.6e+207) {
tmp = t * ((y - x) / y);
} else {
tmp = t * (y / (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) * t) / z
if (y <= (-1.02d+32)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-4.8d-79)) then
tmp = t_1
else if (y <= 1.65d-60) then
tmp = x * (t / (z - y))
else if (y <= 7d+36) then
tmp = y * (t / (y - z))
else if (y <= 6.4d+47) then
tmp = t_1
else if (y <= 5.6d+207) then
tmp = t * ((y - x) / y)
else
tmp = t * (y / (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) * t) / z;
double tmp;
if (y <= -1.02e+32) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4.8e-79) {
tmp = t_1;
} else if (y <= 1.65e-60) {
tmp = x * (t / (z - y));
} else if (y <= 7e+36) {
tmp = y * (t / (y - z));
} else if (y <= 6.4e+47) {
tmp = t_1;
} else if (y <= 5.6e+207) {
tmp = t * ((y - x) / y);
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x - y) * t) / z tmp = 0 if y <= -1.02e+32: tmp = t * (1.0 - (x / y)) elif y <= -4.8e-79: tmp = t_1 elif y <= 1.65e-60: tmp = x * (t / (z - y)) elif y <= 7e+36: tmp = y * (t / (y - z)) elif y <= 6.4e+47: tmp = t_1 elif y <= 5.6e+207: tmp = t * ((y - x) / y) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x - y) * t) / z) tmp = 0.0 if (y <= -1.02e+32) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -4.8e-79) tmp = t_1; elseif (y <= 1.65e-60) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 7e+36) tmp = Float64(y * Float64(t / Float64(y - z))); elseif (y <= 6.4e+47) tmp = t_1; elseif (y <= 5.6e+207) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x - y) * t) / z; tmp = 0.0; if (y <= -1.02e+32) tmp = t * (1.0 - (x / y)); elseif (y <= -4.8e-79) tmp = t_1; elseif (y <= 1.65e-60) tmp = x * (t / (z - y)); elseif (y <= 7e+36) tmp = y * (t / (y - z)); elseif (y <= 6.4e+47) tmp = t_1; elseif (y <= 5.6e+207) tmp = t * ((y - x) / y); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1.02e+32], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.8e-79], t$95$1, If[LessEqual[y, 1.65e-60], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+36], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+47], t$95$1, If[LessEqual[y, 5.6e+207], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-60}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+36}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+207}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.0199999999999999e32Initial program 99.8%
associate-*l/70.1%
associate-/l*79.1%
Simplified79.1%
associate-*r/70.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 58.9%
mul-1-neg58.9%
associate-/l*87.0%
distribute-lft-neg-in87.0%
div-sub87.0%
*-inverses87.0%
Simplified87.0%
if -1.0199999999999999e32 < y < -4.80000000000000011e-79 or 6.9999999999999996e36 < y < 6.4e47Initial program 99.6%
associate-*l/99.6%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 76.1%
if -4.80000000000000011e-79 < y < 1.6499999999999999e-60Initial program 94.0%
associate-*l/87.4%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 81.1%
if 1.6499999999999999e-60 < y < 6.9999999999999996e36Initial program 96.8%
associate-*l/99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 71.3%
neg-mul-171.3%
Simplified71.3%
if 6.4e47 < y < 5.60000000000000022e207Initial program 99.9%
Taylor expanded in z around 0 80.8%
associate-*r/80.8%
neg-mul-180.8%
neg-sub080.8%
sub-neg80.8%
+-commutative80.8%
associate--r+80.8%
neg-sub080.8%
remove-double-neg80.8%
Simplified80.8%
if 5.60000000000000022e207 < y Initial program 99.8%
Taylor expanded in x around 0 99.8%
neg-mul-199.8%
distribute-neg-frac299.8%
neg-sub099.8%
sub-neg99.8%
+-commutative99.8%
associate--r+99.8%
neg-sub099.8%
remove-double-neg99.8%
Simplified99.8%
Final simplification82.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -4e+108)
t_1
(if (<= y -1.8e+19)
(* x (/ t (- z y)))
(if (or (<= y -5e-45) (not (<= y 5e-38))) t_1 (* (- x y) (/ t z)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -4e+108) {
tmp = t_1;
} else if (y <= -1.8e+19) {
tmp = x * (t / (z - y));
} else if ((y <= -5e-45) || !(y <= 5e-38)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / (y - z))
if (y <= (-4d+108)) then
tmp = t_1
else if (y <= (-1.8d+19)) then
tmp = x * (t / (z - y))
else if ((y <= (-5d-45)) .or. (.not. (y <= 5d-38))) then
tmp = t_1
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 t_1 = t * (y / (y - z));
double tmp;
if (y <= -4e+108) {
tmp = t_1;
} else if (y <= -1.8e+19) {
tmp = x * (t / (z - y));
} else if ((y <= -5e-45) || !(y <= 5e-38)) {
tmp = t_1;
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -4e+108: tmp = t_1 elif y <= -1.8e+19: tmp = x * (t / (z - y)) elif (y <= -5e-45) or not (y <= 5e-38): tmp = t_1 else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -4e+108) tmp = t_1; elseif (y <= -1.8e+19) tmp = Float64(x * Float64(t / Float64(z - y))); elseif ((y <= -5e-45) || !(y <= 5e-38)) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); tmp = 0.0; if (y <= -4e+108) tmp = t_1; elseif (y <= -1.8e+19) tmp = x * (t / (z - y)); elseif ((y <= -5e-45) || ~((y <= 5e-38))) tmp = t_1; else tmp = (x - y) * (t / z); 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, -4e+108], t$95$1, If[LessEqual[y, -1.8e+19], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5e-45], N[Not[LessEqual[y, 5e-38]], $MachinePrecision]], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-45} \lor \neg \left(y \leq 5 \cdot 10^{-38}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -4.0000000000000001e108 or -1.8e19 < y < -4.99999999999999976e-45 or 5.00000000000000033e-38 < y Initial program 99.8%
Taylor expanded in x around 0 80.9%
neg-mul-180.9%
distribute-neg-frac280.9%
neg-sub080.9%
sub-neg80.9%
+-commutative80.9%
associate--r+80.9%
neg-sub080.9%
remove-double-neg80.9%
Simplified80.9%
if -4.0000000000000001e108 < y < -1.8e19Initial program 99.6%
associate-*l/83.9%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 63.6%
if -4.99999999999999976e-45 < y < 5.00000000000000033e-38Initial program 94.3%
associate-*l/89.0%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in z around inf 79.2%
Final simplification78.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))))
(if (<= y -1.65e+36)
(* t (/ (- y x) y))
(if (<= y -1.7e-200)
t_1
(if (<= y 2.65e-188)
(/ x (/ (- z y) t))
(if (<= y 3.5e-40) t_1 (* t (/ y (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -1.65e+36) {
tmp = t * ((y - x) / y);
} else if (y <= -1.7e-200) {
tmp = t_1;
} else if (y <= 2.65e-188) {
tmp = x / ((z - y) / t);
} else if (y <= 3.5e-40) {
tmp = t_1;
} else {
tmp = t * (y / (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) * (t / z)
if (y <= (-1.65d+36)) then
tmp = t * ((y - x) / y)
else if (y <= (-1.7d-200)) then
tmp = t_1
else if (y <= 2.65d-188) then
tmp = x / ((z - y) / t)
else if (y <= 3.5d-40) then
tmp = t_1
else
tmp = t * (y / (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) * (t / z);
double tmp;
if (y <= -1.65e+36) {
tmp = t * ((y - x) / y);
} else if (y <= -1.7e-200) {
tmp = t_1;
} else if (y <= 2.65e-188) {
tmp = x / ((z - y) / t);
} else if (y <= 3.5e-40) {
tmp = t_1;
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) tmp = 0 if y <= -1.65e+36: tmp = t * ((y - x) / y) elif y <= -1.7e-200: tmp = t_1 elif y <= 2.65e-188: tmp = x / ((z - y) / t) elif y <= 3.5e-40: tmp = t_1 else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (y <= -1.65e+36) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= -1.7e-200) tmp = t_1; elseif (y <= 2.65e-188) tmp = Float64(x / Float64(Float64(z - y) / t)); elseif (y <= 3.5e-40) tmp = t_1; else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); tmp = 0.0; if (y <= -1.65e+36) tmp = t * ((y - x) / y); elseif (y <= -1.7e-200) tmp = t_1; elseif (y <= 2.65e-188) tmp = x / ((z - y) / t); elseif (y <= 3.5e-40) tmp = t_1; else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+36], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-200], t$95$1, If[LessEqual[y, 2.65e-188], N[(x / N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-40], t$95$1, N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+36}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-188}:\\
\;\;\;\;\frac{x}{\frac{z - y}{t}}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.6499999999999999e36Initial program 99.8%
Taylor expanded in z around 0 87.0%
associate-*r/87.0%
neg-mul-187.0%
neg-sub087.0%
sub-neg87.0%
+-commutative87.0%
associate--r+87.0%
neg-sub087.0%
remove-double-neg87.0%
Simplified87.0%
if -1.6499999999999999e36 < y < -1.7000000000000001e-200 or 2.65000000000000007e-188 < y < 3.5000000000000002e-40Initial program 96.8%
associate-*l/89.4%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in z around inf 72.0%
if -1.7000000000000001e-200 < y < 2.65000000000000007e-188Initial program 92.1%
associate-*l/92.2%
associate-/l*96.1%
Simplified96.1%
clear-num96.0%
un-div-inv96.2%
Applied egg-rr96.2%
Taylor expanded in x around inf 91.1%
if 3.5000000000000002e-40 < y Initial program 99.8%
Taylor expanded in x around 0 79.8%
neg-mul-179.8%
distribute-neg-frac279.8%
neg-sub079.8%
sub-neg79.8%
+-commutative79.8%
associate--r+79.8%
neg-sub079.8%
remove-double-neg79.8%
Simplified79.8%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))))
(if (<= y -1.55e+35)
(* t (/ (- y x) y))
(if (<= y -3.4e-195)
t_1
(if (<= y 5.2e-176)
(* x (/ t (- z y)))
(if (<= y 1.16e-40) t_1 (* t (/ y (- y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -1.55e+35) {
tmp = t * ((y - x) / y);
} else if (y <= -3.4e-195) {
tmp = t_1;
} else if (y <= 5.2e-176) {
tmp = x * (t / (z - y));
} else if (y <= 1.16e-40) {
tmp = t_1;
} else {
tmp = t * (y / (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) * (t / z)
if (y <= (-1.55d+35)) then
tmp = t * ((y - x) / y)
else if (y <= (-3.4d-195)) then
tmp = t_1
else if (y <= 5.2d-176) then
tmp = x * (t / (z - y))
else if (y <= 1.16d-40) then
tmp = t_1
else
tmp = t * (y / (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) * (t / z);
double tmp;
if (y <= -1.55e+35) {
tmp = t * ((y - x) / y);
} else if (y <= -3.4e-195) {
tmp = t_1;
} else if (y <= 5.2e-176) {
tmp = x * (t / (z - y));
} else if (y <= 1.16e-40) {
tmp = t_1;
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) tmp = 0 if y <= -1.55e+35: tmp = t * ((y - x) / y) elif y <= -3.4e-195: tmp = t_1 elif y <= 5.2e-176: tmp = x * (t / (z - y)) elif y <= 1.16e-40: tmp = t_1 else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (y <= -1.55e+35) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= -3.4e-195) tmp = t_1; elseif (y <= 5.2e-176) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 1.16e-40) tmp = t_1; else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); tmp = 0.0; if (y <= -1.55e+35) tmp = t * ((y - x) / y); elseif (y <= -3.4e-195) tmp = t_1; elseif (y <= 5.2e-176) tmp = x * (t / (z - y)); elseif (y <= 1.16e-40) tmp = t_1; else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.55e+35], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-195], t$95$1, If[LessEqual[y, 5.2e-176], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e-40], t$95$1, N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+35}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-176}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.54999999999999993e35Initial program 99.8%
Taylor expanded in z around 0 87.0%
associate-*r/87.0%
neg-mul-187.0%
neg-sub087.0%
sub-neg87.0%
+-commutative87.0%
associate--r+87.0%
neg-sub087.0%
remove-double-neg87.0%
Simplified87.0%
if -1.54999999999999993e35 < y < -3.40000000000000001e-195 or 5.19999999999999984e-176 < y < 1.15999999999999991e-40Initial program 96.7%
associate-*l/90.1%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around inf 71.7%
if -3.40000000000000001e-195 < y < 5.19999999999999984e-176Initial program 92.7%
associate-*l/91.0%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in x around inf 90.0%
if 1.15999999999999991e-40 < y Initial program 99.8%
Taylor expanded in x around 0 79.8%
neg-mul-179.8%
distribute-neg-frac279.8%
neg-sub079.8%
sub-neg79.8%
+-commutative79.8%
associate--r+79.8%
neg-sub079.8%
remove-double-neg79.8%
Simplified79.8%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.5e+32)
(* t (- 1.0 (/ x y)))
(if (<= y -4e-79)
(/ (* (- x y) t) z)
(if (<= y 2.15e-60) (* x (/ t (- z y))) (* t (/ y (- y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+32) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4e-79) {
tmp = ((x - y) * t) / z;
} else if (y <= 2.15e-60) {
tmp = x * (t / (z - y));
} else {
tmp = t * (y / (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) :: tmp
if (y <= (-6.5d+32)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-4d-79)) then
tmp = ((x - y) * t) / z
else if (y <= 2.15d-60) then
tmp = x * (t / (z - y))
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+32) {
tmp = t * (1.0 - (x / y));
} else if (y <= -4e-79) {
tmp = ((x - y) * t) / z;
} else if (y <= 2.15e-60) {
tmp = x * (t / (z - y));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.5e+32: tmp = t * (1.0 - (x / y)) elif y <= -4e-79: tmp = ((x - y) * t) / z elif y <= 2.15e-60: tmp = x * (t / (z - y)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.5e+32) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -4e-79) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 2.15e-60) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.5e+32) tmp = t * (1.0 - (x / y)); elseif (y <= -4e-79) tmp = ((x - y) * t) / z; elseif (y <= 2.15e-60) tmp = x * (t / (z - y)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.5e+32], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e-79], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.15e-60], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+32}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-79}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-60}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -6.4999999999999994e32Initial program 99.8%
associate-*l/70.1%
associate-/l*79.1%
Simplified79.1%
associate-*r/70.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 58.9%
mul-1-neg58.9%
associate-/l*87.0%
distribute-lft-neg-in87.0%
div-sub87.0%
*-inverses87.0%
Simplified87.0%
if -6.4999999999999994e32 < y < -4e-79Initial program 99.5%
associate-*l/99.6%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around inf 73.7%
if -4e-79 < y < 2.15e-60Initial program 94.0%
associate-*l/87.4%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 81.1%
if 2.15e-60 < y Initial program 99.1%
Taylor expanded in x around 0 78.8%
neg-mul-178.8%
distribute-neg-frac278.8%
neg-sub078.8%
sub-neg78.8%
+-commutative78.8%
associate--r+78.8%
neg-sub078.8%
remove-double-neg78.8%
Simplified78.8%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.32e+35)
(* t (/ (- y x) y))
(if (<= y -2.9e-79)
(/ (* (- x y) t) z)
(if (<= y 1.1e-58) (* x (/ t (- z y))) (* t (/ y (- y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.32e+35) {
tmp = t * ((y - x) / y);
} else if (y <= -2.9e-79) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-58) {
tmp = x * (t / (z - y));
} else {
tmp = t * (y / (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) :: tmp
if (y <= (-1.32d+35)) then
tmp = t * ((y - x) / y)
else if (y <= (-2.9d-79)) then
tmp = ((x - y) * t) / z
else if (y <= 1.1d-58) then
tmp = x * (t / (z - y))
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.32e+35) {
tmp = t * ((y - x) / y);
} else if (y <= -2.9e-79) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-58) {
tmp = x * (t / (z - y));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.32e+35: tmp = t * ((y - x) / y) elif y <= -2.9e-79: tmp = ((x - y) * t) / z elif y <= 1.1e-58: tmp = x * (t / (z - y)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.32e+35) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= -2.9e-79) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 1.1e-58) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.32e+35) tmp = t * ((y - x) / y); elseif (y <= -2.9e-79) tmp = ((x - y) * t) / z; elseif (y <= 1.1e-58) tmp = x * (t / (z - y)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.32e+35], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.9e-79], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.1e-58], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+35}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-79}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.31999999999999995e35Initial program 99.8%
Taylor expanded in z around 0 87.0%
associate-*r/87.0%
neg-mul-187.0%
neg-sub087.0%
sub-neg87.0%
+-commutative87.0%
associate--r+87.0%
neg-sub087.0%
remove-double-neg87.0%
Simplified87.0%
if -1.31999999999999995e35 < y < -2.9000000000000001e-79Initial program 99.5%
associate-*l/99.6%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around inf 73.7%
if -2.9000000000000001e-79 < y < 1.10000000000000003e-58Initial program 94.0%
associate-*l/87.4%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in x around inf 81.1%
if 1.10000000000000003e-58 < y Initial program 99.1%
Taylor expanded in x around 0 78.8%
neg-mul-178.8%
distribute-neg-frac278.8%
neg-sub078.8%
sub-neg78.8%
+-commutative78.8%
associate--r+78.8%
neg-sub078.8%
remove-double-neg78.8%
Simplified78.8%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (<= y -7.5e+160) (/ t (- 1.0 (/ z y))) (if (<= y 1.6e+186) (* (- x y) (/ t (- z y))) (* t (/ y (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+160) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.6e+186) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (y / (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) :: tmp
if (y <= (-7.5d+160)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 1.6d+186) then
tmp = (x - y) * (t / (z - y))
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+160) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.6e+186) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+160: tmp = t / (1.0 - (z / y)) elif y <= 1.6e+186: tmp = (x - y) * (t / (z - y)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+160) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 1.6e+186) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+160) tmp = t / (1.0 - (z / y)); elseif (y <= 1.6e+186) tmp = (x - y) * (t / (z - y)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+160], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+186], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+160}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+186}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -7.50000000000000028e160Initial program 99.9%
associate-*l/63.3%
associate-/l*67.8%
Simplified67.8%
associate-*r/63.3%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
associate-/r/67.8%
clear-num65.4%
associate-/r/65.4%
clear-num65.7%
div-inv65.4%
*-un-lft-identity65.4%
times-frac63.1%
Applied egg-rr63.1%
Taylor expanded in x around 0 62.7%
mul-1-neg62.7%
distribute-neg-frac262.7%
*-commutative62.7%
sub-neg62.7%
distribute-neg-in62.7%
remove-double-neg62.7%
+-commutative62.7%
sub-neg62.7%
associate-*r/62.0%
*-commutative62.0%
associate-/r/93.9%
div-sub93.9%
*-inverses93.9%
Simplified93.9%
if -7.50000000000000028e160 < y < 1.6e186Initial program 96.5%
associate-*l/89.6%
associate-/l*92.3%
Simplified92.3%
if 1.6e186 < y Initial program 99.9%
Taylor expanded in x around 0 96.1%
neg-mul-196.1%
distribute-neg-frac296.1%
neg-sub096.1%
sub-neg96.1%
+-commutative96.1%
associate--r+96.1%
neg-sub096.1%
remove-double-neg96.1%
Simplified96.1%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2.9e+65) t (if (<= y 1.58e+53) (* x (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+65) {
tmp = t;
} else if (y <= 1.58e+53) {
tmp = x * (t / (z - y));
} 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.9d+65)) then
tmp = t
else if (y <= 1.58d+53) then
tmp = x * (t / (z - y))
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.9e+65) {
tmp = t;
} else if (y <= 1.58e+53) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e+65: tmp = t elif y <= 1.58e+53: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e+65) tmp = t; elseif (y <= 1.58e+53) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e+65) tmp = t; elseif (y <= 1.58e+53) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e+65], t, If[LessEqual[y, 1.58e+53], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+65}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.58 \cdot 10^{+53}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.9e65 or 1.57999999999999999e53 < y Initial program 99.8%
associate-*l/66.2%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in y around inf 73.8%
if -2.9e65 < y < 1.57999999999999999e53Initial program 95.7%
associate-*l/91.8%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in x around inf 70.6%
(FPCore (x y z t) :precision binary64 (if (<= y -7e+64) t (if (<= y 5.8e-38) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e+64) {
tmp = t;
} else if (y <= 5.8e-38) {
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 <= (-7d+64)) then
tmp = t
else if (y <= 5.8d-38) 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 <= -7e+64) {
tmp = t;
} else if (y <= 5.8e-38) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e+64: tmp = t elif y <= 5.8e-38: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e+64) tmp = t; elseif (y <= 5.8e-38) 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 <= -7e+64) tmp = t; elseif (y <= 5.8e-38) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e+64], t, If[LessEqual[y, 5.8e-38], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+64}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-38}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.9999999999999997e64 or 5.79999999999999988e-38 < y Initial program 99.8%
associate-*l/71.1%
associate-/l*78.0%
Simplified78.0%
Taylor expanded in y around inf 68.1%
if -6.9999999999999997e64 < y < 5.79999999999999988e-38Initial program 95.2%
Taylor expanded in y around 0 63.7%
Final simplification65.7%
(FPCore (x y z t) :precision binary64 (if (<= y -7.5e+64) t (if (<= y 3.2e-51) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+64) {
tmp = t;
} else if (y <= 3.2e-51) {
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 <= (-7.5d+64)) then
tmp = t
else if (y <= 3.2d-51) 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 <= -7.5e+64) {
tmp = t;
} else if (y <= 3.2e-51) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+64: tmp = t elif y <= 3.2e-51: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+64) tmp = t; elseif (y <= 3.2e-51) 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 <= -7.5e+64) tmp = t; elseif (y <= 3.2e-51) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+64], t, If[LessEqual[y, 3.2e-51], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+64}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.5000000000000005e64 or 3.2e-51 < y Initial program 99.8%
associate-*l/71.5%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in y around inf 67.8%
if -7.5000000000000005e64 < y < 3.2e-51Initial program 95.2%
associate-*l/90.8%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around inf 74.1%
Taylor expanded in x around inf 61.3%
(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.3%
associate-*l/81.8%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in y around inf 37.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 2024110
(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))