
(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 96.5%
Final simplification96.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))))
(if (<= y -1.25e+174)
t
(if (<= y -2.2e+128)
t_1
(if (<= y -2.8e+37)
t
(if (<= y 4.8e+27)
t_1
(if (<= y 1.6e+105) (* t (/ (- x y) z)) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (y <= -1.25e+174) {
tmp = t;
} else if (y <= -2.2e+128) {
tmp = t_1;
} else if (y <= -2.8e+37) {
tmp = t;
} else if (y <= 4.8e+27) {
tmp = t_1;
} else if (y <= 1.6e+105) {
tmp = t * ((x - y) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (x / (z - y))
if (y <= (-1.25d+174)) then
tmp = t
else if (y <= (-2.2d+128)) then
tmp = t_1
else if (y <= (-2.8d+37)) then
tmp = t
else if (y <= 4.8d+27) then
tmp = t_1
else if (y <= 1.6d+105) then
tmp = t * ((x - y) / z)
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 / (z - y));
double tmp;
if (y <= -1.25e+174) {
tmp = t;
} else if (y <= -2.2e+128) {
tmp = t_1;
} else if (y <= -2.8e+37) {
tmp = t;
} else if (y <= 4.8e+27) {
tmp = t_1;
} else if (y <= 1.6e+105) {
tmp = t * ((x - y) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) tmp = 0 if y <= -1.25e+174: tmp = t elif y <= -2.2e+128: tmp = t_1 elif y <= -2.8e+37: tmp = t elif y <= 4.8e+27: tmp = t_1 elif y <= 1.6e+105: tmp = t * ((x - y) / z) else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -1.25e+174) tmp = t; elseif (y <= -2.2e+128) tmp = t_1; elseif (y <= -2.8e+37) tmp = t; elseif (y <= 4.8e+27) tmp = t_1; elseif (y <= 1.6e+105) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); tmp = 0.0; if (y <= -1.25e+174) tmp = t; elseif (y <= -2.2e+128) tmp = t_1; elseif (y <= -2.8e+37) tmp = t; elseif (y <= 4.8e+27) tmp = t_1; elseif (y <= 1.6e+105) tmp = t * ((x - y) / z); else tmp = t; 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[y, -1.25e+174], t, If[LessEqual[y, -2.2e+128], t$95$1, If[LessEqual[y, -2.8e+37], t, If[LessEqual[y, 4.8e+27], t$95$1, If[LessEqual[y, 1.6e+105], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+174}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+105}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.2499999999999999e174 or -2.20000000000000017e128 < y < -2.7999999999999998e37 or 1.6e105 < y Initial program 99.9%
associate-*l/70.2%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in y around inf 80.1%
if -1.2499999999999999e174 < y < -2.20000000000000017e128 or -2.7999999999999998e37 < y < 4.79999999999999995e27Initial program 94.5%
Taylor expanded in x around inf 69.1%
if 4.79999999999999995e27 < y < 1.6e105Initial program 99.5%
Taylor expanded in z around inf 57.9%
Final simplification71.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- z y)))))
(if (<= y -1.4e+174)
(+ t (* t (/ z y)))
(if (<= y -1.52e+128)
t_1
(if (<= y -5.8e+34)
t
(if (<= y 1.7e+28)
t_1
(if (<= y 1.85e+105) (* t (/ (- x y) z)) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / (z - y));
double tmp;
if (y <= -1.4e+174) {
tmp = t + (t * (z / y));
} else if (y <= -1.52e+128) {
tmp = t_1;
} else if (y <= -5.8e+34) {
tmp = t;
} else if (y <= 1.7e+28) {
tmp = t_1;
} else if (y <= 1.85e+105) {
tmp = t * ((x - y) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t * (x / (z - y))
if (y <= (-1.4d+174)) then
tmp = t + (t * (z / y))
else if (y <= (-1.52d+128)) then
tmp = t_1
else if (y <= (-5.8d+34)) then
tmp = t
else if (y <= 1.7d+28) then
tmp = t_1
else if (y <= 1.85d+105) then
tmp = t * ((x - y) / z)
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 / (z - y));
double tmp;
if (y <= -1.4e+174) {
tmp = t + (t * (z / y));
} else if (y <= -1.52e+128) {
tmp = t_1;
} else if (y <= -5.8e+34) {
tmp = t;
} else if (y <= 1.7e+28) {
tmp = t_1;
} else if (y <= 1.85e+105) {
tmp = t * ((x - y) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / (z - y)) tmp = 0 if y <= -1.4e+174: tmp = t + (t * (z / y)) elif y <= -1.52e+128: tmp = t_1 elif y <= -5.8e+34: tmp = t elif y <= 1.7e+28: tmp = t_1 elif y <= 1.85e+105: tmp = t * ((x - y) / z) else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (y <= -1.4e+174) tmp = Float64(t + Float64(t * Float64(z / y))); elseif (y <= -1.52e+128) tmp = t_1; elseif (y <= -5.8e+34) tmp = t; elseif (y <= 1.7e+28) tmp = t_1; elseif (y <= 1.85e+105) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / (z - y)); tmp = 0.0; if (y <= -1.4e+174) tmp = t + (t * (z / y)); elseif (y <= -1.52e+128) tmp = t_1; elseif (y <= -5.8e+34) tmp = t; elseif (y <= 1.7e+28) tmp = t_1; elseif (y <= 1.85e+105) tmp = t * ((x - y) / z); else tmp = t; 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[y, -1.4e+174], N[(t + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.52e+128], t$95$1, If[LessEqual[y, -5.8e+34], t, If[LessEqual[y, 1.7e+28], t$95$1, If[LessEqual[y, 1.85e+105], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+174}:\\
\;\;\;\;t + t \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq -1.52 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+34}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+105}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4e174Initial program 99.9%
associate-*l/62.1%
associate-/l*81.3%
Simplified81.3%
associate-*r/62.1%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 95.3%
mul-1-neg95.3%
div-sub95.3%
sub-neg95.3%
*-inverses95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in z around 0 65.2%
associate-/l*75.2%
Simplified75.2%
if -1.4e174 < y < -1.51999999999999992e128 or -5.8000000000000003e34 < y < 1.7e28Initial program 94.5%
Taylor expanded in x around inf 69.1%
if -1.51999999999999992e128 < y < -5.8000000000000003e34 or 1.84999999999999992e105 < y Initial program 99.9%
associate-*l/73.3%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in y around inf 82.5%
if 1.7e28 < y < 1.84999999999999992e105Initial program 99.5%
Taylor expanded in z around inf 57.9%
Final simplification71.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.88e+174)
t
(if (or (<= y -2.45e+128) (and (not (<= y -1.8e+38)) (<= y 3e+21)))
(* t (/ x (- z y)))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.88e+174) {
tmp = t;
} else if ((y <= -2.45e+128) || (!(y <= -1.8e+38) && (y <= 3e+21))) {
tmp = t * (x / (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 <= (-1.88d+174)) then
tmp = t
else if ((y <= (-2.45d+128)) .or. (.not. (y <= (-1.8d+38))) .and. (y <= 3d+21)) then
tmp = t * (x / (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 <= -1.88e+174) {
tmp = t;
} else if ((y <= -2.45e+128) || (!(y <= -1.8e+38) && (y <= 3e+21))) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.88e+174: tmp = t elif (y <= -2.45e+128) or (not (y <= -1.8e+38) and (y <= 3e+21)): tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.88e+174) tmp = t; elseif ((y <= -2.45e+128) || (!(y <= -1.8e+38) && (y <= 3e+21))) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.88e+174) tmp = t; elseif ((y <= -2.45e+128) || (~((y <= -1.8e+38)) && (y <= 3e+21))) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.88e+174], t, If[Or[LessEqual[y, -2.45e+128], And[N[Not[LessEqual[y, -1.8e+38]], $MachinePrecision], LessEqual[y, 3e+21]]], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.88 \cdot 10^{+174}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.45 \cdot 10^{+128} \lor \neg \left(y \leq -1.8 \cdot 10^{+38}\right) \land y \leq 3 \cdot 10^{+21}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.88000000000000006e174 or -2.45000000000000009e128 < y < -1.79999999999999985e38 or 3e21 < y Initial program 99.9%
associate-*l/74.4%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in y around inf 69.8%
if -1.88000000000000006e174 < y < -2.45000000000000009e128 or -1.79999999999999985e38 < y < 3e21Initial program 94.4%
Taylor expanded in x around inf 69.7%
Final simplification69.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -2.9e+189)
t_1
(if (<= y -9e+164)
(* t (- 1.0 (/ x y)))
(if (or (<= y -1.85e-75) (not (<= y 9.2e+20)))
t_1
(/ (* x t) (- z y)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -2.9e+189) {
tmp = t_1;
} else if (y <= -9e+164) {
tmp = t * (1.0 - (x / y));
} else if ((y <= -1.85e-75) || !(y <= 9.2e+20)) {
tmp = t_1;
} else {
tmp = (x * 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) :: t_1
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
if (y <= (-2.9d+189)) then
tmp = t_1
else if (y <= (-9d+164)) then
tmp = t * (1.0d0 - (x / y))
else if ((y <= (-1.85d-75)) .or. (.not. (y <= 9.2d+20))) then
tmp = t_1
else
tmp = (x * t) / (z - y)
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 <= -2.9e+189) {
tmp = t_1;
} else if (y <= -9e+164) {
tmp = t * (1.0 - (x / y));
} else if ((y <= -1.85e-75) || !(y <= 9.2e+20)) {
tmp = t_1;
} else {
tmp = (x * t) / (z - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -2.9e+189: tmp = t_1 elif y <= -9e+164: tmp = t * (1.0 - (x / y)) elif (y <= -1.85e-75) or not (y <= 9.2e+20): tmp = t_1 else: tmp = (x * t) / (z - y) return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -2.9e+189) tmp = t_1; elseif (y <= -9e+164) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif ((y <= -1.85e-75) || !(y <= 9.2e+20)) tmp = t_1; else tmp = Float64(Float64(x * t) / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -2.9e+189) tmp = t_1; elseif (y <= -9e+164) tmp = t * (1.0 - (x / y)); elseif ((y <= -1.85e-75) || ~((y <= 9.2e+20))) tmp = t_1; else tmp = (x * t) / (z - y); 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, -2.9e+189], t$95$1, If[LessEqual[y, -9e+164], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.85e-75], N[Not[LessEqual[y, 9.2e+20]], $MachinePrecision]], t$95$1, N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+164}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 9.2 \cdot 10^{+20}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\end{array}
\end{array}
if y < -2.90000000000000019e189 or -8.9999999999999995e164 < y < -1.85000000000000012e-75 or 9.2e20 < y Initial program 99.8%
associate-*l/80.6%
associate-/l*86.5%
Simplified86.5%
associate-*r/80.6%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 82.6%
mul-1-neg82.6%
div-sub82.7%
sub-neg82.7%
*-inverses82.7%
metadata-eval82.7%
Simplified82.7%
Taylor expanded in t around 0 82.7%
if -2.90000000000000019e189 < y < -8.9999999999999995e164Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
if -1.85000000000000012e-75 < y < 9.2e20Initial program 92.3%
associate-*l/89.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in x around inf 76.7%
Final simplification80.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -8.2e+186)
t_1
(if (<= y -7.5e+163)
(* t (- 1.0 (/ x y)))
(if (<= y -1.85e-75)
(* t (/ y (- y z)))
(if (<= y 3.8e+21) (/ (* x t) (- 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 <= -8.2e+186) {
tmp = t_1;
} else if (y <= -7.5e+163) {
tmp = t * (1.0 - (x / y));
} else if (y <= -1.85e-75) {
tmp = t * (y / (y - z));
} else if (y <= 3.8e+21) {
tmp = (x * t) / (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 <= (-8.2d+186)) then
tmp = t_1
else if (y <= (-7.5d+163)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= (-1.85d-75)) then
tmp = t * (y / (y - z))
else if (y <= 3.8d+21) then
tmp = (x * t) / (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 <= -8.2e+186) {
tmp = t_1;
} else if (y <= -7.5e+163) {
tmp = t * (1.0 - (x / y));
} else if (y <= -1.85e-75) {
tmp = t * (y / (y - z));
} else if (y <= 3.8e+21) {
tmp = (x * t) / (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 <= -8.2e+186: tmp = t_1 elif y <= -7.5e+163: tmp = t * (1.0 - (x / y)) elif y <= -1.85e-75: tmp = t * (y / (y - z)) elif y <= 3.8e+21: tmp = (x * t) / (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 <= -8.2e+186) tmp = t_1; elseif (y <= -7.5e+163) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= -1.85e-75) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (y <= 3.8e+21) tmp = Float64(Float64(x * t) / 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 <= -8.2e+186) tmp = t_1; elseif (y <= -7.5e+163) tmp = t * (1.0 - (x / y)); elseif (y <= -1.85e-75) tmp = t * (y / (y - z)); elseif (y <= 3.8e+21) tmp = (x * t) / (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, -8.2e+186], t$95$1, If[LessEqual[y, -7.5e+163], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.85e-75], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+21], N[(N[(x * t), $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 -8.2 \cdot 10^{+186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-75}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.2e186 or 3.8e21 < y Initial program 99.8%
associate-*l/70.9%
associate-/l*83.3%
Simplified83.3%
associate-*r/70.9%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 89.5%
mul-1-neg89.5%
div-sub89.5%
sub-neg89.5%
*-inverses89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in t around 0 89.5%
if -8.2e186 < y < -7.50000000000000001e163Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
if -7.50000000000000001e163 < y < -1.85000000000000012e-75Initial program 99.9%
Taylor expanded in x around 0 72.8%
neg-mul-172.8%
distribute-neg-frac272.8%
Simplified72.8%
if -1.85000000000000012e-75 < y < 3.8e21Initial program 92.3%
associate-*l/89.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in x around inf 76.7%
Final simplification80.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.8e+32)
t
(if (<= y -4.2e-71)
(* (/ t z) (- y))
(if (<= y -1.55e-91)
(/ (* x t) (- y))
(if (<= y 9.2e+20) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+32) {
tmp = t;
} else if (y <= -4.2e-71) {
tmp = (t / z) * -y;
} else if (y <= -1.55e-91) {
tmp = (x * t) / -y;
} else if (y <= 9.2e+20) {
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 <= (-8.8d+32)) then
tmp = t
else if (y <= (-4.2d-71)) then
tmp = (t / z) * -y
else if (y <= (-1.55d-91)) then
tmp = (x * t) / -y
else if (y <= 9.2d+20) 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 <= -8.8e+32) {
tmp = t;
} else if (y <= -4.2e-71) {
tmp = (t / z) * -y;
} else if (y <= -1.55e-91) {
tmp = (x * t) / -y;
} else if (y <= 9.2e+20) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.8e+32: tmp = t elif y <= -4.2e-71: tmp = (t / z) * -y elif y <= -1.55e-91: tmp = (x * t) / -y elif y <= 9.2e+20: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+32) tmp = t; elseif (y <= -4.2e-71) tmp = Float64(Float64(t / z) * Float64(-y)); elseif (y <= -1.55e-91) tmp = Float64(Float64(x * t) / Float64(-y)); elseif (y <= 9.2e+20) 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 <= -8.8e+32) tmp = t; elseif (y <= -4.2e-71) tmp = (t / z) * -y; elseif (y <= -1.55e-91) tmp = (x * t) / -y; elseif (y <= 9.2e+20) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+32], t, If[LessEqual[y, -4.2e-71], N[(N[(t / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, -1.55e-91], N[(N[(x * t), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[y, 9.2e+20], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-91}:\\
\;\;\;\;\frac{x \cdot t}{-y}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+20}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.80000000000000004e32 or 9.2e20 < y Initial program 99.9%
associate-*l/75.9%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in y around inf 64.1%
if -8.80000000000000004e32 < y < -4.2000000000000002e-71Initial program 99.8%
associate-*l/99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.9%
*-commutative65.9%
associate-/l*66.0%
Simplified66.0%
Taylor expanded in x around 0 52.2%
associate-*r/52.2%
mul-1-neg52.2%
distribute-rgt-neg-out52.2%
associate-*l/52.4%
Simplified52.4%
if -4.2000000000000002e-71 < y < -1.5499999999999999e-91Initial program 87.9%
associate-*l/91.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 64.3%
Taylor expanded in z around 0 64.3%
associate-*r/64.3%
mul-1-neg64.3%
distribute-rgt-neg-out64.3%
Simplified64.3%
if -1.5499999999999999e-91 < y < 9.2e20Initial program 92.9%
Taylor expanded in y around 0 65.5%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.35e+187)
t_1
(if (<= y -7.5e+163)
(* t (- 1.0 (/ x y)))
(if (<= y 1.65e+103) (* (- x y) (/ t (- 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.35e+187) {
tmp = t_1;
} else if (y <= -7.5e+163) {
tmp = t * (1.0 - (x / y));
} else if (y <= 1.65e+103) {
tmp = (x - y) * (t / (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.35d+187)) then
tmp = t_1
else if (y <= (-7.5d+163)) then
tmp = t * (1.0d0 - (x / y))
else if (y <= 1.65d+103) then
tmp = (x - y) * (t / (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.35e+187) {
tmp = t_1;
} else if (y <= -7.5e+163) {
tmp = t * (1.0 - (x / y));
} else if (y <= 1.65e+103) {
tmp = (x - y) * (t / (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.35e+187: tmp = t_1 elif y <= -7.5e+163: tmp = t * (1.0 - (x / y)) elif y <= 1.65e+103: tmp = (x - y) * (t / (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.35e+187) tmp = t_1; elseif (y <= -7.5e+163) tmp = Float64(t * Float64(1.0 - Float64(x / y))); elseif (y <= 1.65e+103) tmp = Float64(Float64(x - y) * Float64(t / 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.35e+187) tmp = t_1; elseif (y <= -7.5e+163) tmp = t * (1.0 - (x / y)); elseif (y <= 1.65e+103) tmp = (x - y) * (t / (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.35e+187], t$95$1, If[LessEqual[y, -7.5e+163], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+103], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+163}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+103}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.35000000000000004e187 or 1.65000000000000004e103 < y Initial program 99.9%
associate-*l/64.6%
associate-/l*78.6%
Simplified78.6%
associate-*r/64.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 97.1%
mul-1-neg97.1%
div-sub97.2%
sub-neg97.2%
*-inverses97.2%
metadata-eval97.2%
Simplified97.2%
Taylor expanded in t around 0 97.2%
if -1.35000000000000004e187 < y < -7.50000000000000001e163Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
if -7.50000000000000001e163 < y < 1.65000000000000004e103Initial program 95.3%
associate-*l/90.9%
associate-/l*91.8%
Simplified91.8%
Final simplification93.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.85e-75) (not (<= y 2.6e+20))) (/ t (- 1.0 (/ z y))) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.85e-75) || !(y <= 2.6e+20)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t * (x / (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 <= (-1.85d-75)) .or. (.not. (y <= 2.6d+20))) then
tmp = t / (1.0d0 - (z / y))
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.85e-75) || !(y <= 2.6e+20)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.85e-75) or not (y <= 2.6e+20): tmp = t / (1.0 - (z / y)) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.85e-75) || !(y <= 2.6e+20)) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.85e-75) || ~((y <= 2.6e+20))) tmp = t / (1.0 - (z / y)); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.85e-75], N[Not[LessEqual[y, 2.6e+20]], $MachinePrecision]], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 2.6 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -1.85000000000000012e-75 or 2.6e20 < y Initial program 99.9%
associate-*l/81.0%
associate-/l*84.6%
Simplified84.6%
associate-*r/81.0%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 80.2%
mul-1-neg80.2%
div-sub80.2%
sub-neg80.2%
*-inverses80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in t around 0 80.2%
if -1.85000000000000012e-75 < y < 2.6e20Initial program 92.3%
Taylor expanded in x around inf 75.5%
Final simplification78.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.85e-75) (not (<= y 3.8e+20))) (/ t (- 1.0 (/ z y))) (/ (* x t) (- z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.85e-75) || !(y <= 3.8e+20)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = (x * 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 <= (-1.85d-75)) .or. (.not. (y <= 3.8d+20))) then
tmp = t / (1.0d0 - (z / y))
else
tmp = (x * 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 <= -1.85e-75) || !(y <= 3.8e+20)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = (x * t) / (z - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.85e-75) or not (y <= 3.8e+20): tmp = t / (1.0 - (z / y)) else: tmp = (x * t) / (z - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.85e-75) || !(y <= 3.8e+20)) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(Float64(x * t) / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.85e-75) || ~((y <= 3.8e+20))) tmp = t / (1.0 - (z / y)); else tmp = (x * t) / (z - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.85e-75], N[Not[LessEqual[y, 3.8e+20]], $MachinePrecision]], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{-75} \lor \neg \left(y \leq 3.8 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{z - y}\\
\end{array}
\end{array}
if y < -1.85000000000000012e-75 or 3.8e20 < y Initial program 99.9%
associate-*l/81.0%
associate-/l*84.6%
Simplified84.6%
associate-*r/81.0%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 80.2%
mul-1-neg80.2%
div-sub80.2%
sub-neg80.2%
*-inverses80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in t around 0 80.2%
if -1.85000000000000012e-75 < y < 3.8e20Initial program 92.3%
associate-*l/89.9%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in x around inf 76.7%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.85e+37) t (if (<= y 9.5e+103) (* (- x y) (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+37) {
tmp = t;
} else if (y <= 9.5e+103) {
tmp = (x - y) * (t / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.85d+37)) then
tmp = t
else if (y <= 9.5d+103) then
tmp = (x - y) * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+37) {
tmp = t;
} else if (y <= 9.5e+103) {
tmp = (x - y) * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+37: tmp = t elif y <= 9.5e+103: tmp = (x - y) * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+37) tmp = t; elseif (y <= 9.5e+103) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+37) tmp = t; elseif (y <= 9.5e+103) tmp = (x - y) * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+37], t, If[LessEqual[y, 9.5e+103], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+103}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.85e37 or 9.49999999999999922e103 < y Initial program 99.9%
associate-*l/72.8%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in y around inf 71.3%
if -1.85e37 < y < 9.49999999999999922e103Initial program 94.7%
associate-*l/91.4%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in z around inf 65.4%
*-commutative65.4%
associate-/l*63.7%
Simplified63.7%
Final simplification66.3%
(FPCore (x y z t) :precision binary64 (if (<= y -8.5e+31) t (if (<= y 3.8e+20) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e+31) {
tmp = t;
} else if (y <= 3.8e+20) {
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 <= (-8.5d+31)) then
tmp = t
else if (y <= 3.8d+20) 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 <= -8.5e+31) {
tmp = t;
} else if (y <= 3.8e+20) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.5e+31: tmp = t elif y <= 3.8e+20: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.5e+31) tmp = t; elseif (y <= 3.8e+20) 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 <= -8.5e+31) tmp = t; elseif (y <= 3.8e+20) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e+31], t, If[LessEqual[y, 3.8e+20], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+31}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.49999999999999947e31 or 3.8e20 < y Initial program 99.9%
associate-*l/75.9%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in y around inf 64.1%
if -8.49999999999999947e31 < y < 3.8e20Initial program 93.9%
associate-*l/92.0%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
associate-/l*55.9%
Simplified55.9%
Final simplification59.4%
(FPCore (x y z t) :precision binary64 (if (<= y -4.8e+36) t (if (<= y 6.5e+20) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+36) {
tmp = t;
} else if (y <= 6.5e+20) {
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 <= (-4.8d+36)) then
tmp = t
else if (y <= 6.5d+20) 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 <= -4.8e+36) {
tmp = t;
} else if (y <= 6.5e+20) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e+36: tmp = t elif y <= 6.5e+20: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+36) tmp = t; elseif (y <= 6.5e+20) 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 <= -4.8e+36) tmp = t; elseif (y <= 6.5e+20) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+36], t, If[LessEqual[y, 6.5e+20], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+20}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.79999999999999985e36 or 6.5e20 < y Initial program 99.9%
associate-*l/75.9%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in y around inf 64.1%
if -4.79999999999999985e36 < y < 6.5e20Initial program 93.9%
Taylor expanded in y around 0 58.7%
Final simplification61.0%
(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.5%
associate-*l/85.1%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in y around inf 37.1%
Final simplification37.1%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024059
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))