
(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 17 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.2%
*-commutative96.2%
associate-*r/82.5%
associate-/l*96.6%
sub-neg96.6%
+-commutative96.6%
neg-sub096.6%
associate-+l-96.6%
sub0-neg96.6%
neg-mul-196.6%
associate-/r*96.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.7e+112)
t_1
(if (<= y -1.8e+37)
(* t (/ (- x y) z))
(if (<= y -1.6e-102)
(/ t (/ y (- y x)))
(if (<= y 1.9e-87)
(* (- x y) (/ t z))
(if (<= y 9.8e+30) (/ (* t x) (- z y)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_1;
} else if (y <= -1.8e+37) {
tmp = t * ((x - y) / z);
} else if (y <= -1.6e-102) {
tmp = t / (y / (y - x));
} else if (y <= 1.9e-87) {
tmp = (x - y) * (t / z);
} else if (y <= 9.8e+30) {
tmp = (t * x) / (z - 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 / (1.0d0 - (z / y))
if (y <= (-1.7d+112)) then
tmp = t_1
else if (y <= (-1.8d+37)) then
tmp = t * ((x - y) / z)
else if (y <= (-1.6d-102)) then
tmp = t / (y / (y - x))
else if (y <= 1.9d-87) then
tmp = (x - y) * (t / z)
else if (y <= 9.8d+30) then
tmp = (t * x) / (z - 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 / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_1;
} else if (y <= -1.8e+37) {
tmp = t * ((x - y) / z);
} else if (y <= -1.6e-102) {
tmp = t / (y / (y - x));
} else if (y <= 1.9e-87) {
tmp = (x - y) * (t / z);
} else if (y <= 9.8e+30) {
tmp = (t * x) / (z - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.7e+112: tmp = t_1 elif y <= -1.8e+37: tmp = t * ((x - y) / z) elif y <= -1.6e-102: tmp = t / (y / (y - x)) elif y <= 1.9e-87: tmp = (x - y) * (t / z) elif y <= 9.8e+30: tmp = (t * x) / (z - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.7e+112) tmp = t_1; elseif (y <= -1.8e+37) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= -1.6e-102) tmp = Float64(t / Float64(y / Float64(y - x))); elseif (y <= 1.9e-87) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 9.8e+30) tmp = Float64(Float64(t * x) / Float64(z - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.7e+112) tmp = t_1; elseif (y <= -1.8e+37) tmp = t * ((x - y) / z); elseif (y <= -1.6e-102) tmp = t / (y / (y - x)); elseif (y <= 1.9e-87) tmp = (x - y) * (t / z); elseif (y <= 9.8e+30) tmp = (t * x) / (z - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+112], t$95$1, If[LessEqual[y, -1.8e+37], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-102], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-87], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+30], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+37}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-87}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.69999999999999997e112 or 9.79999999999999969e30 < y Initial program 99.9%
*-commutative99.9%
associate-*r/71.3%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 84.2%
div-sub84.3%
*-inverses84.3%
Simplified84.3%
if -1.69999999999999997e112 < y < -1.79999999999999999e37Initial program 99.9%
Taylor expanded in z around inf 70.0%
if -1.79999999999999999e37 < y < -1.59999999999999993e-102Initial program 99.7%
*-commutative99.7%
associate-*r/96.5%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in z around 0 70.1%
if -1.59999999999999993e-102 < y < 1.9e-87Initial program 89.5%
Taylor expanded in z around inf 82.9%
associate-/l*81.3%
associate-/r/82.4%
Simplified82.4%
if 1.9e-87 < y < 9.79999999999999969e30Initial program 99.8%
Taylor expanded in x around inf 84.4%
Final simplification81.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+94)
t
(if (<= y -1.75e+45)
(* t (/ x z))
(if (<= y -7.5e+22)
(/ (* t (- y)) z)
(if (<= y -2.6e-100)
(* x (/ (- t) y))
(if (<= y 2.75e+31) (/ t (/ z x)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+94) {
tmp = t;
} else if (y <= -1.75e+45) {
tmp = t * (x / z);
} else if (y <= -7.5e+22) {
tmp = (t * -y) / z;
} else if (y <= -2.6e-100) {
tmp = x * (-t / y);
} else if (y <= 2.75e+31) {
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 <= (-2.2d+94)) then
tmp = t
else if (y <= (-1.75d+45)) then
tmp = t * (x / z)
else if (y <= (-7.5d+22)) then
tmp = (t * -y) / z
else if (y <= (-2.6d-100)) then
tmp = x * (-t / y)
else if (y <= 2.75d+31) 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 <= -2.2e+94) {
tmp = t;
} else if (y <= -1.75e+45) {
tmp = t * (x / z);
} else if (y <= -7.5e+22) {
tmp = (t * -y) / z;
} else if (y <= -2.6e-100) {
tmp = x * (-t / y);
} else if (y <= 2.75e+31) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+94: tmp = t elif y <= -1.75e+45: tmp = t * (x / z) elif y <= -7.5e+22: tmp = (t * -y) / z elif y <= -2.6e-100: tmp = x * (-t / y) elif y <= 2.75e+31: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+94) tmp = t; elseif (y <= -1.75e+45) tmp = Float64(t * Float64(x / z)); elseif (y <= -7.5e+22) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (y <= -2.6e-100) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 2.75e+31) 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 <= -2.2e+94) tmp = t; elseif (y <= -1.75e+45) tmp = t * (x / z); elseif (y <= -7.5e+22) tmp = (t * -y) / z; elseif (y <= -2.6e-100) tmp = x * (-t / y); elseif (y <= 2.75e+31) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+94], t, If[LessEqual[y, -1.75e+45], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.5e+22], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.6e-100], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+31], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-100}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.20000000000000012e94 or 2.75000000000000001e31 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -2.20000000000000012e94 < y < -1.75000000000000011e45Initial program 99.8%
Taylor expanded in y around 0 67.2%
if -1.75000000000000011e45 < y < -7.5000000000000002e22Initial program 99.7%
*-commutative99.7%
associate-*r/99.4%
associate-/l*99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
neg-mul-199.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
Taylor expanded in z around inf 61.5%
mul-1-neg61.5%
associate-/l*61.2%
associate-/r/61.2%
Simplified61.2%
Taylor expanded in y around 0 61.5%
if -7.5000000000000002e22 < y < -2.5999999999999998e-100Initial program 99.8%
*-commutative99.8%
associate-*r/96.0%
associate-/l*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in z around 0 72.9%
Taylor expanded in y around 0 52.0%
*-commutative52.0%
associate-*r/55.6%
neg-mul-155.6%
distribute-rgt-neg-in55.6%
Simplified55.6%
if -2.5999999999999998e-100 < y < 2.75000000000000001e31Initial program 91.3%
*-commutative91.3%
associate-*r/90.1%
associate-/l*92.3%
sub-neg92.3%
+-commutative92.3%
neg-sub092.3%
associate-+l-92.3%
sub0-neg92.3%
neg-mul-192.3%
associate-/r*92.3%
Simplified92.3%
Taylor expanded in y around 0 70.7%
Final simplification69.5%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -8.6e+111)
(and (not (<= y -3.4e+33)) (or (<= y -2.4e-100) (not (<= y 78.0)))))
(* t (/ (- y x) y))
(* t (/ (- x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8.6e+111) || (!(y <= -3.4e+33) && ((y <= -2.4e-100) || !(y <= 78.0)))) {
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 <= (-8.6d+111)) .or. (.not. (y <= (-3.4d+33))) .and. (y <= (-2.4d-100)) .or. (.not. (y <= 78.0d0))) 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 <= -8.6e+111) || (!(y <= -3.4e+33) && ((y <= -2.4e-100) || !(y <= 78.0)))) {
tmp = t * ((y - x) / y);
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8.6e+111) or (not (y <= -3.4e+33) and ((y <= -2.4e-100) or not (y <= 78.0))): tmp = t * ((y - x) / y) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8.6e+111) || (!(y <= -3.4e+33) && ((y <= -2.4e-100) || !(y <= 78.0)))) 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 <= -8.6e+111) || (~((y <= -3.4e+33)) && ((y <= -2.4e-100) || ~((y <= 78.0))))) 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, -8.6e+111], And[N[Not[LessEqual[y, -3.4e+33]], $MachinePrecision], Or[LessEqual[y, -2.4e-100], N[Not[LessEqual[y, 78.0]], $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 -8.6 \cdot 10^{+111} \lor \neg \left(y \leq -3.4 \cdot 10^{+33}\right) \land \left(y \leq -2.4 \cdot 10^{-100} \lor \neg \left(y \leq 78\right)\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if y < -8.59999999999999987e111 or -3.3999999999999999e33 < y < -2.4000000000000003e-100 or 78 < y Initial program 99.9%
Taylor expanded in z around 0 78.4%
associate-*r/78.4%
neg-mul-178.4%
neg-sub078.4%
associate--r-78.4%
neg-sub078.4%
+-commutative78.4%
sub-neg78.4%
Simplified78.4%
if -8.59999999999999987e111 < y < -3.3999999999999999e33 or -2.4000000000000003e-100 < y < 78Initial program 92.0%
Taylor expanded in z around inf 79.0%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))))
(if (<= y -8e+100)
t
(if (<= y -2.55e+22)
t_1
(if (<= y -9.5e-59) (* x (/ (- t) y)) (if (<= y 1.6e+31) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -8e+100) {
tmp = t;
} else if (y <= -2.55e+22) {
tmp = t_1;
} else if (y <= -9.5e-59) {
tmp = x * (-t / y);
} else if (y <= 1.6e+31) {
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 = (x - y) * (t / z)
if (y <= (-8d+100)) then
tmp = t
else if (y <= (-2.55d+22)) then
tmp = t_1
else if (y <= (-9.5d-59)) then
tmp = x * (-t / y)
else if (y <= 1.6d+31) 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 = (x - y) * (t / z);
double tmp;
if (y <= -8e+100) {
tmp = t;
} else if (y <= -2.55e+22) {
tmp = t_1;
} else if (y <= -9.5e-59) {
tmp = x * (-t / y);
} else if (y <= 1.6e+31) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) tmp = 0 if y <= -8e+100: tmp = t elif y <= -2.55e+22: tmp = t_1 elif y <= -9.5e-59: tmp = x * (-t / y) elif y <= 1.6e+31: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (y <= -8e+100) tmp = t; elseif (y <= -2.55e+22) tmp = t_1; elseif (y <= -9.5e-59) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 1.6e+31) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); tmp = 0.0; if (y <= -8e+100) tmp = t; elseif (y <= -2.55e+22) tmp = t_1; elseif (y <= -9.5e-59) tmp = x * (-t / y); elseif (y <= 1.6e+31) tmp = t_1; else tmp = t; 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, -8e+100], t, If[LessEqual[y, -2.55e+22], t$95$1, If[LessEqual[y, -9.5e-59], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+31], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+100}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.55 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-59}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.00000000000000013e100 or 1.6e31 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -8.00000000000000013e100 < y < -2.5500000000000001e22 or -9.4999999999999994e-59 < y < 1.6e31Initial program 92.6%
Taylor expanded in z around inf 75.9%
associate-/l*76.9%
associate-/r/74.9%
Simplified74.9%
if -2.5500000000000001e22 < y < -9.4999999999999994e-59Initial program 99.7%
*-commutative99.7%
associate-*r/95.2%
associate-/l*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in z around 0 75.7%
Taylor expanded in y around 0 57.8%
*-commutative57.8%
associate-*r/62.3%
neg-mul-162.3%
distribute-rgt-neg-in62.3%
Simplified62.3%
Final simplification72.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))))
(if (<= y -4e+94)
t
(if (<= y -2.75e+23)
t_1
(if (<= y -9.5e-59) (* x (/ (- t) y)) (if (<= y 2.6e+30) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -4e+94) {
tmp = t;
} else if (y <= -2.75e+23) {
tmp = t_1;
} else if (y <= -9.5e-59) {
tmp = x * (-t / y);
} else if (y <= 2.6e+30) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((x - y) / z)
if (y <= (-4d+94)) then
tmp = t
else if (y <= (-2.75d+23)) then
tmp = t_1
else if (y <= (-9.5d-59)) then
tmp = x * (-t / y)
else if (y <= 2.6d+30) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -4e+94) {
tmp = t;
} else if (y <= -2.75e+23) {
tmp = t_1;
} else if (y <= -9.5e-59) {
tmp = x * (-t / y);
} else if (y <= 2.6e+30) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) tmp = 0 if y <= -4e+94: tmp = t elif y <= -2.75e+23: tmp = t_1 elif y <= -9.5e-59: tmp = x * (-t / y) elif y <= 2.6e+30: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) tmp = 0.0 if (y <= -4e+94) tmp = t; elseif (y <= -2.75e+23) tmp = t_1; elseif (y <= -9.5e-59) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 2.6e+30) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); tmp = 0.0; if (y <= -4e+94) tmp = t; elseif (y <= -2.75e+23) tmp = t_1; elseif (y <= -9.5e-59) tmp = x * (-t / y); elseif (y <= 2.6e+30) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+94], t, If[LessEqual[y, -2.75e+23], t$95$1, If[LessEqual[y, -9.5e-59], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+30], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;y \leq -4 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-59}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.0000000000000001e94 or 2.59999999999999988e30 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -4.0000000000000001e94 < y < -2.75000000000000002e23 or -9.4999999999999994e-59 < y < 2.59999999999999988e30Initial program 92.6%
Taylor expanded in z around inf 76.1%
if -2.75000000000000002e23 < y < -9.4999999999999994e-59Initial program 99.7%
*-commutative99.7%
associate-*r/95.2%
associate-/l*99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in z around 0 75.7%
Taylor expanded in y around 0 57.8%
*-commutative57.8%
associate-*r/62.3%
neg-mul-162.3%
distribute-rgt-neg-in62.3%
Simplified62.3%
Final simplification73.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.7e+112)
t_2
(if (<= y -1.35e+42)
t_1
(if (<= y -2.6e-100) (* t (/ (- y x) y)) (if (<= y 7e+28) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_2;
} else if (y <= -1.35e+42) {
tmp = t_1;
} else if (y <= -2.6e-100) {
tmp = t * ((y - x) / y);
} else if (y <= 7e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((x - y) / z)
t_2 = t / (1.0d0 - (z / y))
if (y <= (-1.7d+112)) then
tmp = t_2
else if (y <= (-1.35d+42)) then
tmp = t_1
else if (y <= (-2.6d-100)) then
tmp = t * ((y - x) / y)
else if (y <= 7d+28) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_2;
} else if (y <= -1.35e+42) {
tmp = t_1;
} else if (y <= -2.6e-100) {
tmp = t * ((y - x) / y);
} else if (y <= 7e+28) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.7e+112: tmp = t_2 elif y <= -1.35e+42: tmp = t_1 elif y <= -2.6e-100: tmp = t * ((y - x) / y) elif y <= 7e+28: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.7e+112) tmp = t_2; elseif (y <= -1.35e+42) tmp = t_1; elseif (y <= -2.6e-100) tmp = Float64(t * Float64(Float64(y - x) / y)); elseif (y <= 7e+28) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.7e+112) tmp = t_2; elseif (y <= -1.35e+42) tmp = t_1; elseif (y <= -2.6e-100) tmp = t * ((y - x) / y); elseif (y <= 7e+28) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+112], t$95$2, If[LessEqual[y, -1.35e+42], t$95$1, If[LessEqual[y, -2.6e-100], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+28], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-100}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.69999999999999997e112 or 6.9999999999999999e28 < y Initial program 99.9%
*-commutative99.9%
associate-*r/71.3%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 84.2%
div-sub84.3%
*-inverses84.3%
Simplified84.3%
if -1.69999999999999997e112 < y < -1.35e42 or -2.5999999999999998e-100 < y < 6.9999999999999999e28Initial program 92.2%
Taylor expanded in z around inf 77.3%
if -1.35e42 < y < -2.5999999999999998e-100Initial program 99.7%
Taylor expanded in z around 0 70.1%
associate-*r/70.1%
neg-mul-170.1%
neg-sub070.1%
associate--r-70.1%
neg-sub070.1%
+-commutative70.1%
sub-neg70.1%
Simplified70.1%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.7e+112)
t_2
(if (<= y -2.45e+39)
t_1
(if (<= y -2.5e-100)
(/ t (/ y (- y x)))
(if (<= y 1.3e+30) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_2;
} else if (y <= -2.45e+39) {
tmp = t_1;
} else if (y <= -2.5e-100) {
tmp = t / (y / (y - x));
} else if (y <= 1.3e+30) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((x - y) / z)
t_2 = t / (1.0d0 - (z / y))
if (y <= (-1.7d+112)) then
tmp = t_2
else if (y <= (-2.45d+39)) then
tmp = t_1
else if (y <= (-2.5d-100)) then
tmp = t / (y / (y - x))
else if (y <= 1.3d+30) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_2;
} else if (y <= -2.45e+39) {
tmp = t_1;
} else if (y <= -2.5e-100) {
tmp = t / (y / (y - x));
} else if (y <= 1.3e+30) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.7e+112: tmp = t_2 elif y <= -2.45e+39: tmp = t_1 elif y <= -2.5e-100: tmp = t / (y / (y - x)) elif y <= 1.3e+30: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.7e+112) tmp = t_2; elseif (y <= -2.45e+39) tmp = t_1; elseif (y <= -2.5e-100) tmp = Float64(t / Float64(y / Float64(y - x))); elseif (y <= 1.3e+30) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.7e+112) tmp = t_2; elseif (y <= -2.45e+39) tmp = t_1; elseif (y <= -2.5e-100) tmp = t / (y / (y - x)); elseif (y <= 1.3e+30) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+112], t$95$2, If[LessEqual[y, -2.45e+39], t$95$1, If[LessEqual[y, -2.5e-100], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+30], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.45 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-100}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.69999999999999997e112 or 1.29999999999999994e30 < y Initial program 99.9%
*-commutative99.9%
associate-*r/71.3%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 84.2%
div-sub84.3%
*-inverses84.3%
Simplified84.3%
if -1.69999999999999997e112 < y < -2.44999999999999994e39 or -2.5e-100 < y < 1.29999999999999994e30Initial program 92.2%
Taylor expanded in z around inf 77.3%
if -2.44999999999999994e39 < y < -2.5e-100Initial program 99.7%
*-commutative99.7%
associate-*r/96.5%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in z around 0 70.1%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.7e+112)
t_1
(if (<= y -1e+39)
(* t (/ (- x y) z))
(if (<= y -2.6e-100)
(/ t (/ y (- y x)))
(if (<= y 3e+28) (/ (* t (- x y)) z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_1;
} else if (y <= -1e+39) {
tmp = t * ((x - y) / z);
} else if (y <= -2.6e-100) {
tmp = t / (y / (y - x));
} else if (y <= 3e+28) {
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 / (1.0d0 - (z / y))
if (y <= (-1.7d+112)) then
tmp = t_1
else if (y <= (-1d+39)) then
tmp = t * ((x - y) / z)
else if (y <= (-2.6d-100)) then
tmp = t / (y / (y - x))
else if (y <= 3d+28) 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 / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+112) {
tmp = t_1;
} else if (y <= -1e+39) {
tmp = t * ((x - y) / z);
} else if (y <= -2.6e-100) {
tmp = t / (y / (y - x));
} else if (y <= 3e+28) {
tmp = (t * (x - y)) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.7e+112: tmp = t_1 elif y <= -1e+39: tmp = t * ((x - y) / z) elif y <= -2.6e-100: tmp = t / (y / (y - x)) elif y <= 3e+28: tmp = (t * (x - y)) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.7e+112) tmp = t_1; elseif (y <= -1e+39) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (y <= -2.6e-100) tmp = Float64(t / Float64(y / Float64(y - x))); elseif (y <= 3e+28) tmp = Float64(Float64(t * Float64(x - y)) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.7e+112) tmp = t_1; elseif (y <= -1e+39) tmp = t * ((x - y) / z); elseif (y <= -2.6e-100) tmp = t / (y / (y - x)); elseif (y <= 3e+28) 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[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+112], t$95$1, If[LessEqual[y, -1e+39], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.6e-100], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+28], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{+39}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-100}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+28}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.69999999999999997e112 or 3.0000000000000001e28 < y Initial program 99.9%
*-commutative99.9%
associate-*r/71.3%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 84.2%
div-sub84.3%
*-inverses84.3%
Simplified84.3%
if -1.69999999999999997e112 < y < -9.9999999999999994e38Initial program 99.9%
Taylor expanded in z around inf 70.0%
if -9.9999999999999994e38 < y < -2.5999999999999998e-100Initial program 99.7%
*-commutative99.7%
associate-*r/96.5%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in z around 0 70.1%
if -2.5999999999999998e-100 < y < 3.0000000000000001e28Initial program 91.3%
Taylor expanded in z around inf 79.6%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -2e+94)
t
(if (<= y -5.4e+48)
(* t (/ x z))
(if (<= y -2.75e-67)
(* t (/ (- y) z))
(if (<= y 4.8e+28) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e+94) {
tmp = t;
} else if (y <= -5.4e+48) {
tmp = t * (x / z);
} else if (y <= -2.75e-67) {
tmp = t * (-y / z);
} else if (y <= 4.8e+28) {
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 <= (-2d+94)) then
tmp = t
else if (y <= (-5.4d+48)) then
tmp = t * (x / z)
else if (y <= (-2.75d-67)) then
tmp = t * (-y / z)
else if (y <= 4.8d+28) 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 <= -2e+94) {
tmp = t;
} else if (y <= -5.4e+48) {
tmp = t * (x / z);
} else if (y <= -2.75e-67) {
tmp = t * (-y / z);
} else if (y <= 4.8e+28) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e+94: tmp = t elif y <= -5.4e+48: tmp = t * (x / z) elif y <= -2.75e-67: tmp = t * (-y / z) elif y <= 4.8e+28: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e+94) tmp = t; elseif (y <= -5.4e+48) tmp = Float64(t * Float64(x / z)); elseif (y <= -2.75e-67) tmp = Float64(t * Float64(Float64(-y) / z)); elseif (y <= 4.8e+28) 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 <= -2e+94) tmp = t; elseif (y <= -5.4e+48) tmp = t * (x / z); elseif (y <= -2.75e-67) tmp = t * (-y / z); elseif (y <= 4.8e+28) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e+94], t, If[LessEqual[y, -5.4e+48], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.75e-67], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+28], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -2.75 \cdot 10^{-67}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2e94 or 4.79999999999999962e28 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -2e94 < y < -5.40000000000000007e48Initial program 99.8%
Taylor expanded in y around 0 67.2%
if -5.40000000000000007e48 < y < -2.7500000000000001e-67Initial program 99.7%
*-commutative99.7%
associate-*r/96.2%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 47.8%
div-sub47.8%
*-inverses47.8%
Simplified47.8%
Taylor expanded in z around inf 39.3%
mul-1-neg39.3%
associate-/l*42.6%
associate-/r/39.3%
Simplified39.3%
if -2.7500000000000001e-67 < y < 4.79999999999999962e28Initial program 91.6%
*-commutative91.6%
associate-*r/90.3%
associate-/l*92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in y around 0 69.0%
Final simplification67.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.7e+94)
t
(if (<= y -4.2e+46)
(* t (/ x z))
(if (<= y -3.4e-68)
(/ (- y) (/ z t))
(if (<= y 6e+30) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.7e+94) {
tmp = t;
} else if (y <= -4.2e+46) {
tmp = t * (x / z);
} else if (y <= -3.4e-68) {
tmp = -y / (z / t);
} else if (y <= 6e+30) {
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 <= (-4.7d+94)) then
tmp = t
else if (y <= (-4.2d+46)) then
tmp = t * (x / z)
else if (y <= (-3.4d-68)) then
tmp = -y / (z / t)
else if (y <= 6d+30) 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 <= -4.7e+94) {
tmp = t;
} else if (y <= -4.2e+46) {
tmp = t * (x / z);
} else if (y <= -3.4e-68) {
tmp = -y / (z / t);
} else if (y <= 6e+30) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.7e+94: tmp = t elif y <= -4.2e+46: tmp = t * (x / z) elif y <= -3.4e-68: tmp = -y / (z / t) elif y <= 6e+30: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.7e+94) tmp = t; elseif (y <= -4.2e+46) tmp = Float64(t * Float64(x / z)); elseif (y <= -3.4e-68) tmp = Float64(Float64(-y) / Float64(z / t)); elseif (y <= 6e+30) 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 <= -4.7e+94) tmp = t; elseif (y <= -4.2e+46) tmp = t * (x / z); elseif (y <= -3.4e-68) tmp = -y / (z / t); elseif (y <= 6e+30) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.7e+94], t, If[LessEqual[y, -4.2e+46], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-68], N[((-y) / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+30], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+46}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{-y}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+30}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.70000000000000017e94 or 5.99999999999999956e30 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -4.70000000000000017e94 < y < -4.2e46Initial program 99.8%
Taylor expanded in y around 0 67.2%
if -4.2e46 < y < -3.40000000000000018e-68Initial program 99.7%
*-commutative99.7%
associate-*r/96.2%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 47.8%
div-sub47.8%
*-inverses47.8%
Simplified47.8%
Taylor expanded in z around inf 39.3%
mul-1-neg39.3%
associate-/l*42.6%
Simplified42.6%
if -3.40000000000000018e-68 < y < 5.99999999999999956e30Initial program 91.6%
*-commutative91.6%
associate-*r/90.3%
associate-/l*92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
associate-/r*92.5%
Simplified92.5%
Taylor expanded in y around 0 69.0%
Final simplification67.4%
(FPCore (x y z t) :precision binary64 (if (<= x -8e+103) (/ (* t x) (- z y)) (if (<= x 2.6e+52) (/ t (- 1.0 (/ z y))) (/ (- x) (/ (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8e+103) {
tmp = (t * x) / (z - y);
} else if (x <= 2.6e+52) {
tmp = t / (1.0 - (z / y));
} else {
tmp = -x / ((y - z) / 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 <= (-8d+103)) then
tmp = (t * x) / (z - y)
else if (x <= 2.6d+52) then
tmp = t / (1.0d0 - (z / y))
else
tmp = -x / ((y - z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8e+103) {
tmp = (t * x) / (z - y);
} else if (x <= 2.6e+52) {
tmp = t / (1.0 - (z / y));
} else {
tmp = -x / ((y - z) / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -8e+103: tmp = (t * x) / (z - y) elif x <= 2.6e+52: tmp = t / (1.0 - (z / y)) else: tmp = -x / ((y - z) / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -8e+103) tmp = Float64(Float64(t * x) / Float64(z - y)); elseif (x <= 2.6e+52) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(Float64(-x) / Float64(Float64(y - z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -8e+103) tmp = (t * x) / (z - y); elseif (x <= 2.6e+52) tmp = t / (1.0 - (z / y)); else tmp = -x / ((y - z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -8e+103], N[(N[(t * x), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+52], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+103}:\\
\;\;\;\;\frac{t \cdot x}{z - y}\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+52}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\frac{y - z}{t}}\\
\end{array}
\end{array}
if x < -8e103Initial program 93.6%
Taylor expanded in x around inf 76.6%
if -8e103 < x < 2.6e52Initial program 96.9%
*-commutative96.9%
associate-*r/81.9%
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%
Taylor expanded in x around 0 77.6%
div-sub77.6%
*-inverses77.6%
Simplified77.6%
if 2.6e52 < x Initial program 96.5%
*-commutative96.5%
associate-*r/80.1%
associate-/l*98.0%
sub-neg98.0%
+-commutative98.0%
neg-sub098.0%
associate-+l-98.0%
sub0-neg98.0%
neg-mul-198.0%
associate-/r*98.0%
Simplified98.0%
Taylor expanded in x around inf 69.9%
associate-*r/69.9%
mul-1-neg69.9%
*-commutative69.9%
distribute-lft-neg-in69.9%
associate-/l*76.3%
Simplified76.3%
Final simplification77.2%
(FPCore (x y z t) :precision binary64 (if (<= y -2.2e+94) t (if (<= y 1.5e+30) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+94) {
tmp = t;
} else if (y <= 1.5e+30) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.2d+94)) then
tmp = t
else if (y <= 1.5d+30) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+94) {
tmp = t;
} else if (y <= 1.5e+30) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+94: tmp = t elif y <= 1.5e+30: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+94) tmp = t; elseif (y <= 1.5e+30) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e+94) tmp = t; elseif (y <= 1.5e+30) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+94], t, If[LessEqual[y, 1.5e+30], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.20000000000000012e94 or 1.49999999999999989e30 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -2.20000000000000012e94 < y < 1.49999999999999989e30Initial program 93.6%
Taylor expanded in y around 0 55.6%
associate-/l*59.1%
associate-/r/55.5%
Simplified55.5%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.55e+100) t (if (<= y 2.7e+29) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e+100) {
tmp = t;
} else if (y <= 2.7e+29) {
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.55d+100)) then
tmp = t
else if (y <= 2.7d+29) 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.55e+100) {
tmp = t;
} else if (y <= 2.7e+29) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e+100: tmp = t elif y <= 2.7e+29: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e+100) tmp = t; elseif (y <= 2.7e+29) 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.55e+100) tmp = t; elseif (y <= 2.7e+29) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e+100], t, If[LessEqual[y, 2.7e+29], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+100}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+29}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.55000000000000003e100 or 2.7e29 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -1.55000000000000003e100 < y < 2.7e29Initial program 93.6%
Taylor expanded in y around 0 58.4%
Final simplification64.1%
(FPCore (x y z t) :precision binary64 (if (<= y -2e+94) t (if (<= y 4.8e+29) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e+94) {
tmp = t;
} else if (y <= 4.8e+29) {
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 <= (-2d+94)) then
tmp = t
else if (y <= 4.8d+29) 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 <= -2e+94) {
tmp = t;
} else if (y <= 4.8e+29) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e+94: tmp = t elif y <= 4.8e+29: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e+94) tmp = t; elseif (y <= 4.8e+29) 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 <= -2e+94) tmp = t; elseif (y <= 4.8e+29) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e+94], t, If[LessEqual[y, 4.8e+29], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+29}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2e94 or 4.8000000000000002e29 < y Initial program 99.9%
Taylor expanded in y around inf 72.1%
if -2e94 < y < 4.8000000000000002e29Initial program 93.6%
*-commutative93.6%
associate-*r/90.7%
associate-/l*94.3%
sub-neg94.3%
+-commutative94.3%
neg-sub094.3%
associate-+l-94.3%
sub0-neg94.3%
neg-mul-194.3%
associate-/r*94.3%
Simplified94.3%
Taylor expanded in y around 0 59.1%
Final simplification64.6%
(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.2%
Final simplification96.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.2%
Taylor expanded in y around inf 36.3%
Final simplification36.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 2023268
(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))