
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.5%
Final simplification97.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- t) y))))
(if (<= y -8.8e+133)
t
(if (<= y -5.8e+76)
t_1
(if (<= y -135000000000.0)
t
(if (<= y 5.7e-108) (/ t (/ z x)) (if (<= y 5.9e+77) t_1 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (-t / y);
double tmp;
if (y <= -8.8e+133) {
tmp = t;
} else if (y <= -5.8e+76) {
tmp = t_1;
} else if (y <= -135000000000.0) {
tmp = t;
} else if (y <= 5.7e-108) {
tmp = t / (z / x);
} else if (y <= 5.9e+77) {
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 * (-t / y)
if (y <= (-8.8d+133)) then
tmp = t
else if (y <= (-5.8d+76)) then
tmp = t_1
else if (y <= (-135000000000.0d0)) then
tmp = t
else if (y <= 5.7d-108) then
tmp = t / (z / x)
else if (y <= 5.9d+77) 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 * (-t / y);
double tmp;
if (y <= -8.8e+133) {
tmp = t;
} else if (y <= -5.8e+76) {
tmp = t_1;
} else if (y <= -135000000000.0) {
tmp = t;
} else if (y <= 5.7e-108) {
tmp = t / (z / x);
} else if (y <= 5.9e+77) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (-t / y) tmp = 0 if y <= -8.8e+133: tmp = t elif y <= -5.8e+76: tmp = t_1 elif y <= -135000000000.0: tmp = t elif y <= 5.7e-108: tmp = t / (z / x) elif y <= 5.9e+77: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(-t) / y)) tmp = 0.0 if (y <= -8.8e+133) tmp = t; elseif (y <= -5.8e+76) tmp = t_1; elseif (y <= -135000000000.0) tmp = t; elseif (y <= 5.7e-108) tmp = Float64(t / Float64(z / x)); elseif (y <= 5.9e+77) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (-t / y); tmp = 0.0; if (y <= -8.8e+133) tmp = t; elseif (y <= -5.8e+76) tmp = t_1; elseif (y <= -135000000000.0) tmp = t; elseif (y <= 5.7e-108) tmp = t / (z / x); elseif (y <= 5.9e+77) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e+133], t, If[LessEqual[y, -5.8e+76], t$95$1, If[LessEqual[y, -135000000000.0], t, If[LessEqual[y, 5.7e-108], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+77], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{-t}{y}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -135000000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-108}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.8e133 or -5.8000000000000003e76 < y < -1.35e11 or 5.9e77 < y Initial program 99.9%
associate-*l/71.0%
associate-*r/73.7%
Simplified73.7%
Taylor expanded in y around inf 68.7%
if -8.8e133 < y < -5.8000000000000003e76 or 5.7e-108 < y < 5.9e77Initial program 99.5%
associate-*l/95.8%
associate-*r/94.8%
Simplified94.8%
Taylor expanded in x around inf 64.2%
associate-*l/63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in z around 0 47.7%
mul-1-neg47.7%
associate-*l/51.6%
distribute-rgt-neg-in51.6%
Simplified51.6%
if -1.35e11 < y < 5.7e-108Initial program 95.0%
associate-*l/91.7%
associate-*r/92.2%
Simplified92.2%
Taylor expanded in y around 0 66.6%
associate-/l*69.5%
Simplified69.5%
Final simplification66.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.9e+134)
t
(if (<= y -2.1e+82)
(* t (/ (- x) y))
(if (<= y -270000000.0)
t
(if (<= y 5.7e-108)
(/ t (/ z x))
(if (<= y 9e+77) (* x (/ (- t) y)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.9e+134) {
tmp = t;
} else if (y <= -2.1e+82) {
tmp = t * (-x / y);
} else if (y <= -270000000.0) {
tmp = t;
} else if (y <= 5.7e-108) {
tmp = t / (z / x);
} else if (y <= 9e+77) {
tmp = x * (-t / 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+134)) then
tmp = t
else if (y <= (-2.1d+82)) then
tmp = t * (-x / y)
else if (y <= (-270000000.0d0)) then
tmp = t
else if (y <= 5.7d-108) then
tmp = t / (z / x)
else if (y <= 9d+77) then
tmp = x * (-t / 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+134) {
tmp = t;
} else if (y <= -2.1e+82) {
tmp = t * (-x / y);
} else if (y <= -270000000.0) {
tmp = t;
} else if (y <= 5.7e-108) {
tmp = t / (z / x);
} else if (y <= 9e+77) {
tmp = x * (-t / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.9e+134: tmp = t elif y <= -2.1e+82: tmp = t * (-x / y) elif y <= -270000000.0: tmp = t elif y <= 5.7e-108: tmp = t / (z / x) elif y <= 9e+77: tmp = x * (-t / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.9e+134) tmp = t; elseif (y <= -2.1e+82) tmp = Float64(t * Float64(Float64(-x) / y)); elseif (y <= -270000000.0) tmp = t; elseif (y <= 5.7e-108) tmp = Float64(t / Float64(z / x)); elseif (y <= 9e+77) tmp = Float64(x * Float64(Float64(-t) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.9e+134) tmp = t; elseif (y <= -2.1e+82) tmp = t * (-x / y); elseif (y <= -270000000.0) tmp = t; elseif (y <= 5.7e-108) tmp = t / (z / x); elseif (y <= 9e+77) tmp = x * (-t / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.9e+134], t, If[LessEqual[y, -2.1e+82], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -270000000.0], t, If[LessEqual[y, 5.7e-108], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+77], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+134}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{+82}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{elif}\;y \leq -270000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-108}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.89999999999999999e134 or -2.1e82 < y < -2.7e8 or 9.00000000000000049e77 < y Initial program 99.9%
associate-*l/71.0%
associate-*r/73.7%
Simplified73.7%
Taylor expanded in y around inf 68.7%
if -1.89999999999999999e134 < y < -2.1e82Initial program 99.7%
Taylor expanded in z around 0 62.0%
associate-*r/62.0%
neg-mul-162.0%
neg-sub062.0%
associate--r-62.0%
neg-sub062.0%
Simplified62.0%
Taylor expanded in x around inf 55.7%
associate-*r/55.7%
neg-mul-155.7%
Simplified55.7%
if -2.7e8 < y < 5.7e-108Initial program 95.0%
associate-*l/91.7%
associate-*r/92.2%
Simplified92.2%
Taylor expanded in y around 0 66.6%
associate-/l*69.5%
Simplified69.5%
if 5.7e-108 < y < 9.00000000000000049e77Initial program 99.5%
associate-*l/97.2%
associate-*r/93.4%
Simplified93.4%
Taylor expanded in x around inf 66.3%
associate-*l/62.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in z around 0 47.8%
mul-1-neg47.8%
associate-*l/50.3%
distribute-rgt-neg-in50.3%
Simplified50.3%
Final simplification66.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+134)
t
(if (or (<= y -9.6e+79) (and (not (<= y -9.5e+36)) (<= y 7.2e+77)))
(* x (/ t (- z y)))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+134) {
tmp = t;
} else if ((y <= -9.6e+79) || (!(y <= -9.5e+36) && (y <= 7.2e+77))) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1d+134)) then
tmp = t
else if ((y <= (-9.6d+79)) .or. (.not. (y <= (-9.5d+36))) .and. (y <= 7.2d+77)) then
tmp = x * (t / (z - y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+134) {
tmp = t;
} else if ((y <= -9.6e+79) || (!(y <= -9.5e+36) && (y <= 7.2e+77))) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+134: tmp = t elif (y <= -9.6e+79) or (not (y <= -9.5e+36) and (y <= 7.2e+77)): tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+134) tmp = t; elseif ((y <= -9.6e+79) || (!(y <= -9.5e+36) && (y <= 7.2e+77))) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+134) tmp = t; elseif ((y <= -9.6e+79) || (~((y <= -9.5e+36)) && (y <= 7.2e+77))) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+134], t, If[Or[LessEqual[y, -9.6e+79], And[N[Not[LessEqual[y, -9.5e+36]], $MachinePrecision], LessEqual[y, 7.2e+77]]], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+134}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{+79} \lor \neg \left(y \leq -9.5 \cdot 10^{+36}\right) \land y \leq 7.2 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -9.99999999999999921e133 or -9.59999999999999942e79 < y < -9.49999999999999974e36 or 7.1999999999999996e77 < y Initial program 99.9%
associate-*l/70.7%
associate-*r/72.5%
Simplified72.5%
Taylor expanded in y around inf 70.6%
if -9.99999999999999921e133 < y < -9.59999999999999942e79 or -9.49999999999999974e36 < y < 7.1999999999999996e77Initial program 96.3%
associate-*l/92.4%
associate-*r/93.1%
Simplified93.1%
Taylor expanded in x around inf 71.8%
associate-*l/72.5%
*-commutative72.5%
Simplified72.5%
Final simplification71.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))))
(if (<= x -8.6e+46)
t_1
(if (<= x -3.2e-98)
t
(if (<= x -7.2e-205) (* (- x y) (/ t z)) (if (<= x 6.5e-124) t t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (x <= -8.6e+46) {
tmp = t_1;
} else if (x <= -3.2e-98) {
tmp = t;
} else if (x <= -7.2e-205) {
tmp = (x - y) * (t / z);
} else if (x <= 6.5e-124) {
tmp = t;
} 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 * (x / (z - y))
if (x <= (-8.6d+46)) then
tmp = t_1
else if (x <= (-3.2d-98)) then
tmp = t
else if (x <= (-7.2d-205)) then
tmp = (x - y) * (t / z)
else if (x <= 6.5d-124) then
tmp = t
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 * (x / (z - y));
double tmp;
if (x <= -8.6e+46) {
tmp = t_1;
} else if (x <= -3.2e-98) {
tmp = t;
} else if (x <= -7.2e-205) {
tmp = (x - y) * (t / z);
} else if (x <= 6.5e-124) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) tmp = 0 if x <= -8.6e+46: tmp = t_1 elif x <= -3.2e-98: tmp = t elif x <= -7.2e-205: tmp = (x - y) * (t / z) elif x <= 6.5e-124: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -8.6e+46) tmp = t_1; elseif (x <= -3.2e-98) tmp = t; elseif (x <= -7.2e-205) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (x <= 6.5e-124) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); tmp = 0.0; if (x <= -8.6e+46) tmp = t_1; elseif (x <= -3.2e-98) tmp = t; elseif (x <= -7.2e-205) tmp = (x - y) * (t / z); elseif (x <= 6.5e-124) tmp = t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.6e+46], t$95$1, If[LessEqual[x, -3.2e-98], t, If[LessEqual[x, -7.2e-205], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-124], t, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -8.6 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-98}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-205}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-124}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -8.60000000000000009e46 or 6.49999999999999988e-124 < x Initial program 98.4%
Taylor expanded in x around inf 81.4%
if -8.60000000000000009e46 < x < -3.2000000000000001e-98 or -7.1999999999999997e-205 < x < 6.49999999999999988e-124Initial program 97.5%
associate-*l/86.3%
associate-*r/79.2%
Simplified79.2%
Taylor expanded in y around inf 59.9%
if -3.2000000000000001e-98 < x < -7.1999999999999997e-205Initial program 90.7%
associate-*l/99.6%
associate-*r/95.1%
Simplified95.1%
Taylor expanded in z around inf 85.8%
Final simplification74.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -2.05e+93)
t_2
(if (<= x -8.5e-133)
t_1
(if (<= x -7.4e-155)
(* (- x y) (/ t z))
(if (<= x 3.5e-94) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.05e+93) {
tmp = t_2;
} else if (x <= -8.5e-133) {
tmp = t_1;
} else if (x <= -7.4e-155) {
tmp = (x - y) * (t / z);
} else if (x <= 3.5e-94) {
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 * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-2.05d+93)) then
tmp = t_2
else if (x <= (-8.5d-133)) then
tmp = t_1
else if (x <= (-7.4d-155)) then
tmp = (x - y) * (t / z)
else if (x <= 3.5d-94) 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 * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.05e+93) {
tmp = t_2;
} else if (x <= -8.5e-133) {
tmp = t_1;
} else if (x <= -7.4e-155) {
tmp = (x - y) * (t / z);
} else if (x <= 3.5e-94) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -2.05e+93: tmp = t_2 elif x <= -8.5e-133: tmp = t_1 elif x <= -7.4e-155: tmp = (x - y) * (t / z) elif x <= 3.5e-94: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -2.05e+93) tmp = t_2; elseif (x <= -8.5e-133) tmp = t_1; elseif (x <= -7.4e-155) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (x <= 3.5e-94) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -2.05e+93) tmp = t_2; elseif (x <= -8.5e-133) tmp = t_1; elseif (x <= -7.4e-155) tmp = (x - y) * (t / z); elseif (x <= 3.5e-94) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.05e+93], t$95$2, If[LessEqual[x, -8.5e-133], t$95$1, If[LessEqual[x, -7.4e-155], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-94], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.4 \cdot 10^{-155}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -2.0500000000000001e93 or 3.49999999999999998e-94 < x Initial program 98.4%
Taylor expanded in x around inf 83.7%
if -2.0500000000000001e93 < x < -8.49999999999999957e-133 or -7.4000000000000001e-155 < x < 3.49999999999999998e-94Initial program 97.2%
Taylor expanded in x around 0 82.2%
neg-mul-182.2%
distribute-neg-frac82.2%
Simplified82.2%
frac-2neg82.2%
div-inv82.1%
remove-double-neg82.1%
sub-neg82.1%
distribute-neg-in82.1%
remove-double-neg82.1%
Applied egg-rr82.1%
associate-*r/82.2%
*-rgt-identity82.2%
+-commutative82.2%
unsub-neg82.2%
Simplified82.2%
if -8.49999999999999957e-133 < x < -7.4000000000000001e-155Initial program 83.2%
associate-*l/99.5%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Final simplification83.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -3.35e+93)
t_2
(if (<= x -1e-132)
t_1
(if (<= x -7.5e-207)
(* t (/ (- x y) z))
(if (<= x 3.8e-84) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -3.35e+93) {
tmp = t_2;
} else if (x <= -1e-132) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = t * ((x - y) / z);
} else if (x <= 3.8e-84) {
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 * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-3.35d+93)) then
tmp = t_2
else if (x <= (-1d-132)) then
tmp = t_1
else if (x <= (-7.5d-207)) then
tmp = t * ((x - y) / z)
else if (x <= 3.8d-84) 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 * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -3.35e+93) {
tmp = t_2;
} else if (x <= -1e-132) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = t * ((x - y) / z);
} else if (x <= 3.8e-84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -3.35e+93: tmp = t_2 elif x <= -1e-132: tmp = t_1 elif x <= -7.5e-207: tmp = t * ((x - y) / z) elif x <= 3.8e-84: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -3.35e+93) tmp = t_2; elseif (x <= -1e-132) tmp = t_1; elseif (x <= -7.5e-207) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (x <= 3.8e-84) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -3.35e+93) tmp = t_2; elseif (x <= -1e-132) tmp = t_1; elseif (x <= -7.5e-207) tmp = t * ((x - y) / z); elseif (x <= 3.8e-84) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.35e+93], t$95$2, If[LessEqual[x, -1e-132], t$95$1, If[LessEqual[x, -7.5e-207], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-84], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -3.35 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-207}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -3.34999999999999983e93 or 3.79999999999999986e-84 < x Initial program 98.4%
Taylor expanded in x around inf 83.7%
if -3.34999999999999983e93 < x < -9.9999999999999999e-133 or -7.5000000000000006e-207 < x < 3.79999999999999986e-84Initial program 97.8%
Taylor expanded in x around 0 83.1%
neg-mul-183.1%
distribute-neg-frac83.1%
Simplified83.1%
frac-2neg83.1%
div-inv82.9%
remove-double-neg82.9%
sub-neg82.9%
distribute-neg-in82.9%
remove-double-neg82.9%
Applied egg-rr82.9%
associate-*r/83.1%
*-rgt-identity83.1%
+-commutative83.1%
unsub-neg83.1%
Simplified83.1%
if -9.9999999999999999e-133 < x < -7.5000000000000006e-207Initial program 89.1%
Taylor expanded in z around inf 83.8%
Final simplification83.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -2.05e+93)
t_2
(if (<= x -8.5e-133)
t_1
(if (<= x -7.5e-207)
(/ t (/ z (- x y)))
(if (<= x 1.8e-84) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.05e+93) {
tmp = t_2;
} else if (x <= -8.5e-133) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = t / (z / (x - y));
} else if (x <= 1.8e-84) {
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 * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-2.05d+93)) then
tmp = t_2
else if (x <= (-8.5d-133)) then
tmp = t_1
else if (x <= (-7.5d-207)) then
tmp = t / (z / (x - y))
else if (x <= 1.8d-84) 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 * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -2.05e+93) {
tmp = t_2;
} else if (x <= -8.5e-133) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = t / (z / (x - y));
} else if (x <= 1.8e-84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -2.05e+93: tmp = t_2 elif x <= -8.5e-133: tmp = t_1 elif x <= -7.5e-207: tmp = t / (z / (x - y)) elif x <= 1.8e-84: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -2.05e+93) tmp = t_2; elseif (x <= -8.5e-133) tmp = t_1; elseif (x <= -7.5e-207) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (x <= 1.8e-84) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -2.05e+93) tmp = t_2; elseif (x <= -8.5e-133) tmp = t_1; elseif (x <= -7.5e-207) tmp = t / (z / (x - y)); elseif (x <= 1.8e-84) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.05e+93], t$95$2, If[LessEqual[x, -8.5e-133], t$95$1, If[LessEqual[x, -7.5e-207], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e-84], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{+93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-207}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -2.0500000000000001e93 or 1.80000000000000002e-84 < x Initial program 98.4%
Taylor expanded in x around inf 83.7%
if -2.0500000000000001e93 < x < -8.49999999999999957e-133 or -7.5000000000000006e-207 < x < 1.80000000000000002e-84Initial program 97.8%
Taylor expanded in x around 0 83.1%
neg-mul-183.1%
distribute-neg-frac83.1%
Simplified83.1%
frac-2neg83.1%
div-inv82.9%
remove-double-neg82.9%
sub-neg82.9%
distribute-neg-in82.9%
remove-double-neg82.9%
Applied egg-rr82.9%
associate-*r/83.1%
*-rgt-identity83.1%
+-commutative83.1%
unsub-neg83.1%
Simplified83.1%
if -8.49999999999999957e-133 < x < -7.5000000000000006e-207Initial program 89.1%
associate-*l/99.6%
associate-*r/89.1%
Simplified89.1%
Taylor expanded in z around inf 94.2%
associate-/l*84.1%
Simplified84.1%
Final simplification83.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -1.26e+94)
t_2
(if (<= x -6.2e-131)
t_1
(if (<= x -7.5e-207)
(/ (* (- x y) t) z)
(if (<= x 2.8e-95) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -1.26e+94) {
tmp = t_2;
} else if (x <= -6.2e-131) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = ((x - y) * t) / z;
} else if (x <= 2.8e-95) {
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 * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-1.26d+94)) then
tmp = t_2
else if (x <= (-6.2d-131)) then
tmp = t_1
else if (x <= (-7.5d-207)) then
tmp = ((x - y) * t) / z
else if (x <= 2.8d-95) 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 * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -1.26e+94) {
tmp = t_2;
} else if (x <= -6.2e-131) {
tmp = t_1;
} else if (x <= -7.5e-207) {
tmp = ((x - y) * t) / z;
} else if (x <= 2.8e-95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -1.26e+94: tmp = t_2 elif x <= -6.2e-131: tmp = t_1 elif x <= -7.5e-207: tmp = ((x - y) * t) / z elif x <= 2.8e-95: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -1.26e+94) tmp = t_2; elseif (x <= -6.2e-131) tmp = t_1; elseif (x <= -7.5e-207) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (x <= 2.8e-95) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -1.26e+94) tmp = t_2; elseif (x <= -6.2e-131) tmp = t_1; elseif (x <= -7.5e-207) tmp = ((x - y) * t) / z; elseif (x <= 2.8e-95) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.26e+94], t$95$2, If[LessEqual[x, -6.2e-131], t$95$1, If[LessEqual[x, -7.5e-207], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[x, 2.8e-95], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -1.26 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-207}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.25999999999999997e94 or 2.7999999999999999e-95 < x Initial program 98.4%
Taylor expanded in x around inf 83.7%
if -1.25999999999999997e94 < x < -6.20000000000000041e-131 or -7.5000000000000006e-207 < x < 2.7999999999999999e-95Initial program 97.8%
Taylor expanded in x around 0 83.1%
neg-mul-183.1%
distribute-neg-frac83.1%
Simplified83.1%
frac-2neg83.1%
div-inv82.9%
remove-double-neg82.9%
sub-neg82.9%
distribute-neg-in82.9%
remove-double-neg82.9%
Applied egg-rr82.9%
associate-*r/83.1%
*-rgt-identity83.1%
+-commutative83.1%
unsub-neg83.1%
Simplified83.1%
if -6.20000000000000041e-131 < x < -7.5000000000000006e-207Initial program 89.1%
associate-*l/99.6%
associate-*r/89.1%
Simplified89.1%
associate-*r/99.6%
clear-num99.5%
Applied egg-rr99.5%
associate-/r*89.3%
div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in z around inf 94.2%
Final simplification84.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e+142) (not (<= y 7.2e+115))) (/ t (/ y (- y x))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e+142) || !(y <= 7.2e+115)) {
tmp = t / (y / (y - x));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2d+142)) .or. (.not. (y <= 7.2d+115))) then
tmp = t / (y / (y - x))
else
tmp = (x - y) * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e+142) || !(y <= 7.2e+115)) {
tmp = t / (y / (y - x));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e+142) or not (y <= 7.2e+115): tmp = t / (y / (y - x)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e+142) || !(y <= 7.2e+115)) tmp = Float64(t / Float64(y / Float64(y - x))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e+142) || ~((y <= 7.2e+115))) tmp = t / (y / (y - x)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e+142], N[Not[LessEqual[y, 7.2e+115]], $MachinePrecision]], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+142} \lor \neg \left(y \leq 7.2 \cdot 10^{+115}\right):\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -2.0000000000000001e142 or 7.2000000000000001e115 < y Initial program 99.9%
Taylor expanded in z around 0 89.5%
associate-*r/89.5%
neg-mul-189.5%
neg-sub089.5%
associate--r-89.5%
neg-sub089.5%
Simplified89.5%
Taylor expanded in t around 0 58.5%
associate-/l*89.5%
Simplified89.5%
if -2.0000000000000001e142 < y < 7.2000000000000001e115Initial program 96.6%
associate-*l/92.1%
associate-*r/92.7%
Simplified92.7%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (if (<= y -61000000.0) t (if (<= y 4.8e+77) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -61000000.0) {
tmp = t;
} else if (y <= 4.8e+77) {
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 <= (-61000000.0d0)) then
tmp = t
else if (y <= 4.8d+77) 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 <= -61000000.0) {
tmp = t;
} else if (y <= 4.8e+77) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -61000000.0: tmp = t elif y <= 4.8e+77: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -61000000.0) tmp = t; elseif (y <= 4.8e+77) 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 <= -61000000.0) tmp = t; elseif (y <= 4.8e+77) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -61000000.0], t, If[LessEqual[y, 4.8e+77], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -61000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.1e7 or 4.7999999999999997e77 < y Initial program 99.9%
associate-*l/73.0%
associate-*r/76.3%
Simplified76.3%
Taylor expanded in y around inf 63.3%
if -6.1e7 < y < 4.7999999999999997e77Initial program 96.0%
associate-*l/92.9%
associate-*r/92.5%
Simplified92.5%
associate-*r/92.9%
clear-num92.4%
Applied egg-rr92.4%
Taylor expanded in y around 0 58.4%
associate-*l/57.4%
*-commutative57.4%
Simplified57.4%
Final simplification59.7%
(FPCore (x y z t) :precision binary64 (if (<= y -58000000000.0) t (if (<= y 4.8e+77) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -58000000000.0) {
tmp = t;
} else if (y <= 4.8e+77) {
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 <= (-58000000000.0d0)) then
tmp = t
else if (y <= 4.8d+77) 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 <= -58000000000.0) {
tmp = t;
} else if (y <= 4.8e+77) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -58000000000.0: tmp = t elif y <= 4.8e+77: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -58000000000.0) tmp = t; elseif (y <= 4.8e+77) 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 <= -58000000000.0) tmp = t; elseif (y <= 4.8e+77) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -58000000000.0], t, If[LessEqual[y, 4.8e+77], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -58000000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+77}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.8e10 or 4.7999999999999997e77 < y Initial program 99.9%
associate-*l/73.0%
associate-*r/76.3%
Simplified76.3%
Taylor expanded in y around inf 63.3%
if -5.8e10 < y < 4.7999999999999997e77Initial program 96.0%
Taylor expanded in y around 0 60.4%
Final simplification61.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1320000000.0) t (if (<= y 5.9e+77) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1320000000.0) {
tmp = t;
} else if (y <= 5.9e+77) {
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 <= (-1320000000.0d0)) then
tmp = t
else if (y <= 5.9d+77) 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 <= -1320000000.0) {
tmp = t;
} else if (y <= 5.9e+77) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1320000000.0: tmp = t elif y <= 5.9e+77: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1320000000.0) tmp = t; elseif (y <= 5.9e+77) 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 <= -1320000000.0) tmp = t; elseif (y <= 5.9e+77) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1320000000.0], t, If[LessEqual[y, 5.9e+77], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1320000000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+77}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.32e9 or 5.9e77 < y Initial program 99.9%
associate-*l/73.0%
associate-*r/76.3%
Simplified76.3%
Taylor expanded in y around inf 63.3%
if -1.32e9 < y < 5.9e77Initial program 96.0%
associate-*l/92.9%
associate-*r/92.5%
Simplified92.5%
Taylor expanded in y around 0 58.4%
associate-/l*60.6%
Simplified60.6%
Final simplification61.7%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.5%
associate-*l/85.0%
associate-*r/86.1%
Simplified86.1%
Taylor expanded in y around inf 31.5%
Final simplification31.5%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2023178
(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))