
(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 16 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 (/ (- y z) (- y x))))
double code(double x, double y, double z, double t) {
return t / ((y - z) / (y - x));
}
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 / ((y - z) / (y - x))
end function
public static double code(double x, double y, double z, double t) {
return t / ((y - z) / (y - x));
}
def code(x, y, z, t): return t / ((y - z) / (y - x))
function code(x, y, z, t) return Float64(t / Float64(Float64(y - z) / Float64(y - x))) end
function tmp = code(x, y, z, t) tmp = t / ((y - z) / (y - x)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(y - z), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{y - z}{y - x}}
\end{array}
Initial program 96.9%
*-commutative96.9%
associate-*r/84.1%
associate-/l*96.9%
sub-neg96.9%
+-commutative96.9%
neg-sub096.9%
associate-+l-96.9%
sub0-neg96.9%
neg-mul-196.9%
associate-/r*96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -1.7e+151)
t
(if (<= y -2.6e-57)
t_1
(if (<= y -6e-89)
(/ (- y) (/ z t))
(if (<= y -9.5e-91)
(* (/ t y) (- x))
(if (<= y 3.8e-57) (/ t (/ z x)) (if (<= y 1.15e+136) t_1 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -1.7e+151) {
tmp = t;
} else if (y <= -2.6e-57) {
tmp = t_1;
} else if (y <= -6e-89) {
tmp = -y / (z / t);
} else if (y <= -9.5e-91) {
tmp = (t / y) * -x;
} else if (y <= 3.8e-57) {
tmp = t / (z / x);
} else if (y <= 1.15e+136) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-1.7d+151)) then
tmp = t
else if (y <= (-2.6d-57)) then
tmp = t_1
else if (y <= (-6d-89)) then
tmp = -y / (z / t)
else if (y <= (-9.5d-91)) then
tmp = (t / y) * -x
else if (y <= 3.8d-57) then
tmp = t / (z / x)
else if (y <= 1.15d+136) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -1.7e+151) {
tmp = t;
} else if (y <= -2.6e-57) {
tmp = t_1;
} else if (y <= -6e-89) {
tmp = -y / (z / t);
} else if (y <= -9.5e-91) {
tmp = (t / y) * -x;
} else if (y <= 3.8e-57) {
tmp = t / (z / x);
} else if (y <= 1.15e+136) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -1.7e+151: tmp = t elif y <= -2.6e-57: tmp = t_1 elif y <= -6e-89: tmp = -y / (z / t) elif y <= -9.5e-91: tmp = (t / y) * -x elif y <= 3.8e-57: tmp = t / (z / x) elif y <= 1.15e+136: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -1.7e+151) tmp = t; elseif (y <= -2.6e-57) tmp = t_1; elseif (y <= -6e-89) tmp = Float64(Float64(-y) / Float64(z / t)); elseif (y <= -9.5e-91) tmp = Float64(Float64(t / y) * Float64(-x)); elseif (y <= 3.8e-57) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.15e+136) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -1.7e+151) tmp = t; elseif (y <= -2.6e-57) tmp = t_1; elseif (y <= -6e-89) tmp = -y / (z / t); elseif (y <= -9.5e-91) tmp = (t / y) * -x; elseif (y <= 3.8e-57) tmp = t / (z / x); elseif (y <= 1.15e+136) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+151], t, If[LessEqual[y, -2.6e-57], t$95$1, If[LessEqual[y, -6e-89], N[((-y) / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.5e-91], N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision], If[LessEqual[y, 3.8e-57], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+136], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+151}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-89}:\\
\;\;\;\;\frac{-y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-57}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+136}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.7e151 or 1.15e136 < y Initial program 99.9%
Taylor expanded in y around inf 81.0%
if -1.7e151 < y < -2.59999999999999985e-57 or 3.7999999999999997e-57 < y < 1.15e136Initial program 97.8%
*-commutative97.8%
associate-*r/91.5%
associate-/l*97.8%
sub-neg97.8%
+-commutative97.8%
neg-sub097.8%
associate-+l-97.8%
sub0-neg97.8%
neg-mul-197.8%
associate-/r*97.8%
Simplified97.8%
associate-/r/91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 65.2%
if -2.59999999999999985e-57 < y < -5.9999999999999999e-89Initial program 83.8%
*-commutative83.8%
associate-*r/100.0%
associate-/l*83.8%
sub-neg83.8%
+-commutative83.8%
neg-sub083.8%
associate-+l-83.8%
sub0-neg83.8%
neg-mul-183.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in x around 0 83.8%
div-sub83.8%
*-inverses83.8%
Simplified83.8%
Taylor expanded in z around inf 96.7%
mul-1-neg96.7%
associate-/l*96.7%
distribute-neg-frac96.7%
Simplified96.7%
if -5.9999999999999999e-89 < y < -9.5e-91Initial program 99.2%
Taylor expanded in z around 0 99.2%
associate-*r/99.2%
neg-mul-199.2%
neg-sub099.2%
associate--r-99.2%
neg-sub099.2%
+-commutative99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 99.2%
mul-1-neg99.2%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
if -9.5e-91 < y < 3.7999999999999997e-57Initial program 94.6%
*-commutative94.6%
associate-*r/92.7%
associate-/l*94.7%
sub-neg94.7%
+-commutative94.7%
neg-sub094.7%
associate-+l-94.7%
sub0-neg94.7%
neg-mul-194.7%
associate-/r*94.7%
Simplified94.7%
Taylor expanded in y around 0 77.9%
Final simplification74.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ t y))))
(if (<= y -9e+150)
t
(if (<= y -4.7e-36)
t_1
(if (<= y 8.5e-40) (* t (/ (- x y) z)) (if (<= y 4.7e+132) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -9e+150) {
tmp = t;
} else if (y <= -4.7e-36) {
tmp = t_1;
} else if (y <= 8.5e-40) {
tmp = t * ((x - y) / z);
} else if (y <= 4.7e+132) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) * (t / y)
if (y <= (-9d+150)) then
tmp = t
else if (y <= (-4.7d-36)) then
tmp = t_1
else if (y <= 8.5d-40) then
tmp = t * ((x - y) / z)
else if (y <= 4.7d+132) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (t / y);
double tmp;
if (y <= -9e+150) {
tmp = t;
} else if (y <= -4.7e-36) {
tmp = t_1;
} else if (y <= 8.5e-40) {
tmp = t * ((x - y) / z);
} else if (y <= 4.7e+132) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (t / y) tmp = 0 if y <= -9e+150: tmp = t elif y <= -4.7e-36: tmp = t_1 elif y <= 8.5e-40: tmp = t * ((x - y) / z) elif y <= 4.7e+132: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(t / y)) tmp = 0.0 if (y <= -9e+150) tmp = t; elseif (y <= -4.7e-36) tmp = t_1; elseif (y <= 8.5e-40) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= 4.7e+132) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (t / y); tmp = 0.0; if (y <= -9e+150) tmp = t; elseif (y <= -4.7e-36) tmp = t_1; elseif (y <= 8.5e-40) tmp = t * ((x - y) / z); elseif (y <= 4.7e+132) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+150], t, If[LessEqual[y, -4.7e-36], t$95$1, If[LessEqual[y, 8.5e-40], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.7e+132], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+150}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -9.00000000000000001e150 or 4.7e132 < y Initial program 99.9%
Taylor expanded in y around inf 81.0%
if -9.00000000000000001e150 < y < -4.7000000000000003e-36 or 8.4999999999999998e-40 < y < 4.7e132Initial program 99.8%
*-commutative99.8%
associate-*r/91.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%
associate-/r/90.5%
Applied egg-rr90.5%
Taylor expanded in y around inf 67.0%
if -4.7000000000000003e-36 < y < 8.4999999999999998e-40Initial program 92.6%
Taylor expanded in z around inf 79.5%
Final simplification75.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e-52)
t
(if (<= y -2.8e-86)
(/ (- y) (/ z t))
(if (<= y 1.15e-63)
(/ t (/ z x))
(if (<= y 3.2e+45) (* t (/ (- x) y)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e-52) {
tmp = t;
} else if (y <= -2.8e-86) {
tmp = -y / (z / t);
} else if (y <= 1.15e-63) {
tmp = t / (z / x);
} else if (y <= 3.2e+45) {
tmp = t * (-x / 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 <= (-7.5d-52)) then
tmp = t
else if (y <= (-2.8d-86)) then
tmp = -y / (z / t)
else if (y <= 1.15d-63) then
tmp = t / (z / x)
else if (y <= 3.2d+45) then
tmp = t * (-x / 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 <= -7.5e-52) {
tmp = t;
} else if (y <= -2.8e-86) {
tmp = -y / (z / t);
} else if (y <= 1.15e-63) {
tmp = t / (z / x);
} else if (y <= 3.2e+45) {
tmp = t * (-x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e-52: tmp = t elif y <= -2.8e-86: tmp = -y / (z / t) elif y <= 1.15e-63: tmp = t / (z / x) elif y <= 3.2e+45: tmp = t * (-x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e-52) tmp = t; elseif (y <= -2.8e-86) tmp = Float64(Float64(-y) / Float64(z / t)); elseif (y <= 1.15e-63) tmp = Float64(t / Float64(z / x)); elseif (y <= 3.2e+45) tmp = Float64(t * Float64(Float64(-x) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e-52) tmp = t; elseif (y <= -2.8e-86) tmp = -y / (z / t); elseif (y <= 1.15e-63) tmp = t / (z / x); elseif (y <= 3.2e+45) tmp = t * (-x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e-52], t, If[LessEqual[y, -2.8e-86], N[((-y) / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-63], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+45], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-52}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{-y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-63}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.50000000000000006e-52 or 3.2000000000000003e45 < y Initial program 99.2%
Taylor expanded in y around inf 62.4%
if -7.50000000000000006e-52 < y < -2.80000000000000009e-86Initial program 83.8%
*-commutative83.8%
associate-*r/100.0%
associate-/l*83.8%
sub-neg83.8%
+-commutative83.8%
neg-sub083.8%
associate-+l-83.8%
sub0-neg83.8%
neg-mul-183.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in x around 0 83.8%
div-sub83.8%
*-inverses83.8%
Simplified83.8%
Taylor expanded in z around inf 96.7%
mul-1-neg96.7%
associate-/l*96.7%
distribute-neg-frac96.7%
Simplified96.7%
if -2.80000000000000009e-86 < y < 1.15e-63Initial program 94.7%
*-commutative94.7%
associate-*r/92.8%
associate-/l*94.8%
sub-neg94.8%
+-commutative94.8%
neg-sub094.8%
associate-+l-94.8%
sub0-neg94.8%
neg-mul-194.8%
associate-/r*94.8%
Simplified94.8%
Taylor expanded in y around 0 76.2%
if 1.15e-63 < y < 3.2000000000000003e45Initial program 95.1%
Taylor expanded in z around 0 61.6%
associate-*r/61.6%
neg-mul-161.6%
neg-sub061.6%
associate--r-61.6%
neg-sub061.6%
+-commutative61.6%
sub-neg61.6%
Simplified61.6%
Taylor expanded in y around 0 61.7%
neg-mul-161.7%
distribute-neg-frac61.7%
Simplified61.7%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e-52)
t
(if (<= y -9.2e-91)
(/ (* t (- y)) z)
(if (<= y 1e-54) (/ t (/ z x)) (if (<= y 1.2e+45) (* t (/ (- x) y)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e-52) {
tmp = t;
} else if (y <= -9.2e-91) {
tmp = (t * -y) / z;
} else if (y <= 1e-54) {
tmp = t / (z / x);
} else if (y <= 1.2e+45) {
tmp = t * (-x / 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 <= (-1.9d-52)) then
tmp = t
else if (y <= (-9.2d-91)) then
tmp = (t * -y) / z
else if (y <= 1d-54) then
tmp = t / (z / x)
else if (y <= 1.2d+45) then
tmp = t * (-x / 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 <= -1.9e-52) {
tmp = t;
} else if (y <= -9.2e-91) {
tmp = (t * -y) / z;
} else if (y <= 1e-54) {
tmp = t / (z / x);
} else if (y <= 1.2e+45) {
tmp = t * (-x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e-52: tmp = t elif y <= -9.2e-91: tmp = (t * -y) / z elif y <= 1e-54: tmp = t / (z / x) elif y <= 1.2e+45: tmp = t * (-x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e-52) tmp = t; elseif (y <= -9.2e-91) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (y <= 1e-54) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.2e+45) tmp = Float64(t * Float64(Float64(-x) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e-52) tmp = t; elseif (y <= -9.2e-91) tmp = (t * -y) / z; elseif (y <= 1e-54) tmp = t / (z / x); elseif (y <= 1.2e+45) tmp = t * (-x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e-52], t, If[LessEqual[y, -9.2e-91], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1e-54], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+45], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-52}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-91}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;y \leq 10^{-54}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.9000000000000002e-52 or 1.19999999999999995e45 < y Initial program 99.2%
Taylor expanded in y around inf 62.4%
if -1.9000000000000002e-52 < y < -9.19999999999999982e-91Initial program 87.6%
Taylor expanded in z around inf 60.6%
Taylor expanded in x around 0 72.6%
associate-*r/72.6%
*-commutative72.6%
associate-*r*72.6%
neg-mul-172.6%
Simplified72.6%
if -9.19999999999999982e-91 < y < 1e-54Initial program 94.6%
*-commutative94.6%
associate-*r/92.7%
associate-/l*94.7%
sub-neg94.7%
+-commutative94.7%
neg-sub094.7%
associate-+l-94.7%
sub0-neg94.7%
neg-mul-194.7%
associate-/r*94.7%
Simplified94.7%
Taylor expanded in y around 0 77.9%
if 1e-54 < y < 1.19999999999999995e45Initial program 95.1%
Taylor expanded in z around 0 61.6%
associate-*r/61.6%
neg-mul-161.6%
neg-sub061.6%
associate--r-61.6%
neg-sub061.6%
+-commutative61.6%
sub-neg61.6%
Simplified61.6%
Taylor expanded in y around 0 61.7%
neg-mul-161.7%
distribute-neg-frac61.7%
Simplified61.7%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ (- z y) x))))
(if (<= x -6.4e+69)
t_1
(if (<= x 7e-31)
(/ t (- 1.0 (/ z y)))
(if (<= x 6.8e+71) (* t (/ (- y x) y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t / ((z - y) / x);
double tmp;
if (x <= -6.4e+69) {
tmp = t_1;
} else if (x <= 7e-31) {
tmp = t / (1.0 - (z / y));
} else if (x <= 6.8e+71) {
tmp = t * ((y - x) / y);
} 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 / ((z - y) / x)
if (x <= (-6.4d+69)) then
tmp = t_1
else if (x <= 7d-31) then
tmp = t / (1.0d0 - (z / y))
else if (x <= 6.8d+71) then
tmp = t * ((y - x) / y)
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 - y) / x);
double tmp;
if (x <= -6.4e+69) {
tmp = t_1;
} else if (x <= 7e-31) {
tmp = t / (1.0 - (z / y));
} else if (x <= 6.8e+71) {
tmp = t * ((y - x) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / ((z - y) / x) tmp = 0 if x <= -6.4e+69: tmp = t_1 elif x <= 7e-31: tmp = t / (1.0 - (z / y)) elif x <= 6.8e+71: tmp = t * ((y - x) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(Float64(z - y) / x)) tmp = 0.0 if (x <= -6.4e+69) tmp = t_1; elseif (x <= 7e-31) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (x <= 6.8e+71) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / ((z - y) / x); tmp = 0.0; if (x <= -6.4e+69) tmp = t_1; elseif (x <= 7e-31) tmp = t / (1.0 - (z / y)); elseif (x <= 6.8e+71) tmp = t * ((y - x) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.4e+69], t$95$1, If[LessEqual[x, 7e-31], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e+71], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z - y}{x}}\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-31}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.3999999999999997e69 or 6.7999999999999997e71 < x Initial program 95.9%
Taylor expanded in x around inf 81.1%
associate-/l*83.9%
Simplified83.9%
if -6.3999999999999997e69 < x < 6.99999999999999971e-31Initial program 97.1%
*-commutative97.1%
associate-*r/81.1%
associate-/l*97.2%
sub-neg97.2%
+-commutative97.2%
neg-sub097.2%
associate-+l-97.2%
sub0-neg97.2%
neg-mul-197.2%
associate-/r*97.2%
Simplified97.2%
Taylor expanded in x around 0 84.0%
div-sub84.0%
*-inverses84.0%
Simplified84.0%
if 6.99999999999999971e-31 < x < 6.7999999999999997e71Initial program 99.9%
Taylor expanded in z around 0 83.0%
associate-*r/83.0%
neg-mul-183.0%
neg-sub083.0%
associate--r-83.0%
neg-sub083.0%
+-commutative83.0%
sub-neg83.0%
Simplified83.0%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (<= y -6.5e+149) (/ t (- 1.0 (/ z y))) (if (<= y 2.8e+138) (* (- y x) (/ t (- y z))) (* t (/ (- y x) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+149) {
tmp = t / (1.0 - (z / y));
} else if (y <= 2.8e+138) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t * ((y - x) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-6.5d+149)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 2.8d+138) then
tmp = (y - x) * (t / (y - z))
else
tmp = t * ((y - x) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+149) {
tmp = t / (1.0 - (z / y));
} else if (y <= 2.8e+138) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t * ((y - x) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.5e+149: tmp = t / (1.0 - (z / y)) elif y <= 2.8e+138: tmp = (y - x) * (t / (y - z)) else: tmp = t * ((y - x) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.5e+149) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 2.8e+138) tmp = Float64(Float64(y - x) * Float64(t / Float64(y - z))); else tmp = Float64(t * Float64(Float64(y - x) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.5e+149) tmp = t / (1.0 - (z / y)); elseif (y <= 2.8e+138) tmp = (y - x) * (t / (y - z)); else tmp = t * ((y - x) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.5e+149], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+138], N[(N[(y - x), $MachinePrecision] * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+149}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+138}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\end{array}
\end{array}
if y < -6.50000000000000015e149Initial program 99.9%
*-commutative99.9%
associate-*r/68.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 x around 0 86.7%
div-sub86.7%
*-inverses86.7%
Simplified86.7%
if -6.50000000000000015e149 < y < 2.8000000000000001e138Initial program 95.8%
*-commutative95.8%
associate-*r/92.0%
associate-/l*95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
associate-/r*95.9%
Simplified95.9%
associate-/r/90.7%
Applied egg-rr90.7%
if 2.8000000000000001e138 < y Initial program 100.0%
Taylor expanded in z around 0 100.0%
associate-*r/100.0%
neg-mul-1100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Final simplification91.3%
(FPCore (x y z t) :precision binary64 (if (<= y -1.3e-32) t (if (<= y 2.3e-54) (/ t (/ z x)) (if (<= y 1.75e+44) (* (/ t y) (- x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-32) {
tmp = t;
} else if (y <= 2.3e-54) {
tmp = t / (z / x);
} else if (y <= 1.75e+44) {
tmp = (t / y) * -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.3d-32)) then
tmp = t
else if (y <= 2.3d-54) then
tmp = t / (z / x)
else if (y <= 1.75d+44) then
tmp = (t / y) * -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.3e-32) {
tmp = t;
} else if (y <= 2.3e-54) {
tmp = t / (z / x);
} else if (y <= 1.75e+44) {
tmp = (t / y) * -x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e-32: tmp = t elif y <= 2.3e-54: tmp = t / (z / x) elif y <= 1.75e+44: tmp = (t / y) * -x else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e-32) tmp = t; elseif (y <= 2.3e-54) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.75e+44) tmp = Float64(Float64(t / y) * Float64(-x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e-32) tmp = t; elseif (y <= 2.3e-54) tmp = t / (z / x); elseif (y <= 1.75e+44) tmp = (t / y) * -x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e-32], t, If[LessEqual[y, 2.3e-54], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+44], N[(N[(t / y), $MachinePrecision] * (-x)), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+44}:\\
\;\;\;\;\frac{t}{y} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.2999999999999999e-32 or 1.75e44 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -1.2999999999999999e-32 < y < 2.2999999999999999e-54Initial program 93.4%
*-commutative93.4%
associate-*r/92.6%
associate-/l*93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
Simplified93.4%
Taylor expanded in y around 0 70.8%
if 2.2999999999999999e-54 < y < 1.75e44Initial program 95.1%
Taylor expanded in z around 0 61.6%
associate-*r/61.6%
neg-mul-161.6%
neg-sub061.6%
associate--r-61.6%
neg-sub061.6%
+-commutative61.6%
sub-neg61.6%
Simplified61.6%
Taylor expanded in y around 0 61.6%
mul-1-neg61.6%
associate-*l/60.3%
distribute-rgt-neg-in60.3%
Simplified60.3%
Final simplification66.4%
(FPCore (x y z t) :precision binary64 (if (<= y -5.5e-34) t (if (<= y 2.35e-54) (/ t (/ z x)) (if (<= y 2.5e+44) (* t (/ (- x) y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-34) {
tmp = t;
} else if (y <= 2.35e-54) {
tmp = t / (z / x);
} else if (y <= 2.5e+44) {
tmp = t * (-x / 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 <= (-5.5d-34)) then
tmp = t
else if (y <= 2.35d-54) then
tmp = t / (z / x)
else if (y <= 2.5d+44) then
tmp = t * (-x / 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 <= -5.5e-34) {
tmp = t;
} else if (y <= 2.35e-54) {
tmp = t / (z / x);
} else if (y <= 2.5e+44) {
tmp = t * (-x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.5e-34: tmp = t elif y <= 2.35e-54: tmp = t / (z / x) elif y <= 2.5e+44: tmp = t * (-x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e-34) tmp = t; elseif (y <= 2.35e-54) tmp = Float64(t / Float64(z / x)); elseif (y <= 2.5e+44) tmp = Float64(t * Float64(Float64(-x) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.5e-34) tmp = t; elseif (y <= 2.35e-54) tmp = t / (z / x); elseif (y <= 2.5e+44) tmp = t * (-x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e-34], t, If[LessEqual[y, 2.35e-54], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+44], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.50000000000000014e-34 or 2.4999999999999998e44 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -5.50000000000000014e-34 < y < 2.35e-54Initial program 93.4%
*-commutative93.4%
associate-*r/92.6%
associate-/l*93.4%
sub-neg93.4%
+-commutative93.4%
neg-sub093.4%
associate-+l-93.4%
sub0-neg93.4%
neg-mul-193.4%
associate-/r*93.4%
Simplified93.4%
Taylor expanded in y around 0 70.8%
if 2.35e-54 < y < 2.4999999999999998e44Initial program 95.1%
Taylor expanded in z around 0 61.6%
associate-*r/61.6%
neg-mul-161.6%
neg-sub061.6%
associate--r-61.6%
neg-sub061.6%
+-commutative61.6%
sub-neg61.6%
Simplified61.6%
Taylor expanded in y around 0 61.7%
neg-mul-161.7%
distribute-neg-frac61.7%
Simplified61.7%
Final simplification66.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.2e-42) (not (<= y 8.5e-40))) (* t (/ (- y x) y)) (* t (/ (- x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e-42) || !(y <= 8.5e-40)) {
tmp = t * ((y - x) / 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) :: tmp
if ((y <= (-4.2d-42)) .or. (.not. (y <= 8.5d-40))) then
tmp = t * ((y - x) / 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 tmp;
if ((y <= -4.2e-42) || !(y <= 8.5e-40)) {
tmp = t * ((y - x) / y);
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.2e-42) or not (y <= 8.5e-40): tmp = t * ((y - x) / y) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.2e-42) || !(y <= 8.5e-40)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(t * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.2e-42) || ~((y <= 8.5e-40))) tmp = t * ((y - x) / y); else tmp = t * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.2e-42], N[Not[LessEqual[y, 8.5e-40]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-42} \lor \neg \left(y \leq 8.5 \cdot 10^{-40}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if y < -4.20000000000000013e-42 or 8.4999999999999998e-40 < y Initial program 99.9%
Taylor expanded in z around 0 78.0%
associate-*r/78.0%
neg-mul-178.0%
neg-sub078.0%
associate--r-78.0%
neg-sub078.0%
+-commutative78.0%
sub-neg78.0%
Simplified78.0%
if -4.20000000000000013e-42 < y < 8.4999999999999998e-40Initial program 92.6%
Taylor expanded in z around inf 79.5%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.16e-33) t (if (<= y 1.35e+43) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.16e-33) {
tmp = t;
} else if (y <= 1.35e+43) {
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 <= (-1.16d-33)) then
tmp = t
else if (y <= 1.35d+43) 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 <= -1.16e-33) {
tmp = t;
} else if (y <= 1.35e+43) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.16e-33: tmp = t elif y <= 1.35e+43: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.16e-33) tmp = t; elseif (y <= 1.35e+43) 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 <= -1.16e-33) tmp = t; elseif (y <= 1.35e+43) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.16e-33], t, If[LessEqual[y, 1.35e+43], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.16 \cdot 10^{-33}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+43}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.1600000000000001e-33 or 1.3500000000000001e43 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -1.1600000000000001e-33 < y < 1.3500000000000001e43Initial program 93.6%
Taylor expanded in y around 0 61.6%
associate-/l*63.8%
associate-/r/61.1%
Simplified61.1%
Final simplification62.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.45e-32) t (if (<= y 2e+44) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-32) {
tmp = t;
} else if (y <= 2e+44) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.45d-32)) then
tmp = t
else if (y <= 2d+44) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-32) {
tmp = t;
} else if (y <= 2e+44) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e-32: tmp = t elif y <= 2e+44: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-32) tmp = t; elseif (y <= 2e+44) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e-32) tmp = t; elseif (y <= 2e+44) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-32], t, If[LessEqual[y, 2e+44], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.44999999999999998e-32 or 2.0000000000000002e44 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -1.44999999999999998e-32 < y < 2.0000000000000002e44Initial program 93.6%
Taylor expanded in y around 0 63.8%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.45e-32) t (if (<= y 2e+45) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-32) {
tmp = t;
} else if (y <= 2e+45) {
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.45d-32)) then
tmp = t
else if (y <= 2d+45) 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.45e-32) {
tmp = t;
} else if (y <= 2e+45) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e-32: tmp = t elif y <= 2e+45: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-32) tmp = t; elseif (y <= 2e+45) 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.45e-32) tmp = t; elseif (y <= 2e+45) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-32], t, If[LessEqual[y, 2e+45], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+45}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.44999999999999998e-32 or 1.9999999999999999e45 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -1.44999999999999998e-32 < y < 1.9999999999999999e45Initial program 93.6%
*-commutative93.6%
associate-*r/93.8%
associate-/l*93.7%
sub-neg93.7%
+-commutative93.7%
neg-sub093.7%
associate-+l-93.7%
sub0-neg93.7%
neg-mul-193.7%
associate-/r*93.7%
Simplified93.7%
Taylor expanded in y around 0 63.8%
Final simplification63.9%
(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 96.9%
Final simplification96.9%
(FPCore (x y z t) :precision binary64 (if (<= x -1.5e+106) (* t (/ x y)) t))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.5e+106) {
tmp = t * (x / 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 (x <= (-1.5d+106)) then
tmp = t * (x / 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 (x <= -1.5e+106) {
tmp = t * (x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.5e+106: tmp = t * (x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.5e+106) tmp = Float64(t * Float64(x / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.5e+106) tmp = t * (x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.5e+106], N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if x < -1.5e106Initial program 92.2%
*-commutative92.2%
associate-*r/89.4%
associate-/l*92.1%
sub-neg92.1%
+-commutative92.1%
neg-sub092.1%
associate-+l-92.1%
sub0-neg92.1%
neg-mul-192.1%
associate-/r*92.1%
Simplified92.1%
Taylor expanded in z around 0 45.4%
Taylor expanded in y around 0 39.6%
associate-*r/39.6%
mul-1-neg39.6%
distribute-rgt-neg-out39.6%
Simplified39.6%
expm1-log1p-u21.5%
expm1-udef17.1%
associate-/l*17.1%
associate-/r/17.1%
add-sqr-sqrt17.1%
sqrt-unprod11.7%
sqr-neg11.7%
sqrt-unprod0.0%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
expm1-def10.0%
expm1-log1p24.0%
associate-*l/23.9%
associate-*r/24.0%
Simplified24.0%
if -1.5e106 < x Initial program 97.7%
Taylor expanded in y around inf 42.9%
Final simplification40.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.9%
Taylor expanded in y around inf 38.1%
Final simplification38.1%
(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 2023274
(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))