
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ 60.0 (- z t)) (- x y))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_2 -5e+87)
t_1
(if (<= t_2 -5e-31)
(+ (* 60.0 (/ x z)) (* a 120.0))
(if (<= t_2 -2e-117)
t_1
(if (<= t_2 5e-51) (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z - t)) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+87) {
tmp = t_1;
} else if (t_2 <= -5e-31) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else if (t_2 <= -2e-117) {
tmp = t_1;
} else if (t_2 <= 5e-51) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (60.0d0 / (z - t)) * (x - y)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+87)) then
tmp = t_1
else if (t_2 <= (-5d-31)) then
tmp = (60.0d0 * (x / z)) + (a * 120.0d0)
else if (t_2 <= (-2d-117)) then
tmp = t_1
else if (t_2 <= 5d-51) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / ((z - t) / (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z - t)) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+87) {
tmp = t_1;
} else if (t_2 <= -5e-31) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else if (t_2 <= -2e-117) {
tmp = t_1;
} else if (t_2 <= 5e-51) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / (z - t)) * (x - y) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+87: tmp = t_1 elif t_2 <= -5e-31: tmp = (60.0 * (x / z)) + (a * 120.0) elif t_2 <= -2e-117: tmp = t_1 elif t_2 <= 5e-51: tmp = a * 120.0 else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+87) tmp = t_1; elseif (t_2 <= -5e-31) tmp = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)); elseif (t_2 <= -2e-117) tmp = t_1; elseif (t_2 <= 5e-51) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / (z - t)) * (x - y); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+87) tmp = t_1; elseif (t_2 <= -5e-31) tmp = (60.0 * (x / z)) + (a * 120.0); elseif (t_2 <= -2e-117) tmp = t_1; elseif (t_2 <= 5e-51) tmp = a * 120.0; else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+87], t$95$1, If[LessEqual[t$95$2, -5e-31], N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-117], t$95$1, If[LessEqual[t$95$2, 5e-51], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t} \cdot \left(x - y\right)\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-31}:\\
\;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.9999999999999998e87 or -5e-31 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -2.00000000000000006e-117Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 84.3%
*-commutative84.3%
associate-*l/84.3%
associate-*r/84.4%
Simplified84.4%
if -4.9999999999999998e87 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5e-31Initial program 99.9%
+-commutative99.9%
fma-def99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
Taylor expanded in y around 0 67.2%
if -2.00000000000000006e-117 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.00000000000000004e-51Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 87.3%
if 5.00000000000000004e-51 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.9%
expm1-log1p-u75.1%
expm1-udef67.7%
associate-*r/67.7%
associate-/l*67.7%
Applied egg-rr67.7%
expm1-def75.0%
expm1-log1p79.0%
Simplified79.0%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+76)
(* a 120.0)
(if (<= (- z t) 1e+92)
(* (/ 60.0 (- z t)) (- x y))
(if (<= (- z t) 5e+179)
(+ (* 60.0 (/ y t)) (* a 120.0))
(if (<= (- z t) 4e+265)
(+ (* 60.0 (/ x z)) (* a 120.0))
(* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+76) {
tmp = a * 120.0;
} else if ((z - t) <= 1e+92) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((z - t) <= 5e+179) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((z - t) <= 4e+265) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z - t) <= (-5d+76)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d+92) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if ((z - t) <= 5d+179) then
tmp = (60.0d0 * (y / t)) + (a * 120.0d0)
else if ((z - t) <= 4d+265) then
tmp = (60.0d0 * (x / z)) + (a * 120.0d0)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+76) {
tmp = a * 120.0;
} else if ((z - t) <= 1e+92) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((z - t) <= 5e+179) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((z - t) <= 4e+265) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+76: tmp = a * 120.0 elif (z - t) <= 1e+92: tmp = (60.0 / (z - t)) * (x - y) elif (z - t) <= 5e+179: tmp = (60.0 * (y / t)) + (a * 120.0) elif (z - t) <= 4e+265: tmp = (60.0 * (x / z)) + (a * 120.0) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+76) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e+92) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (Float64(z - t) <= 5e+179) tmp = Float64(Float64(60.0 * Float64(y / t)) + Float64(a * 120.0)); elseif (Float64(z - t) <= 4e+265) tmp = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+76) tmp = a * 120.0; elseif ((z - t) <= 1e+92) tmp = (60.0 / (z - t)) * (x - y); elseif ((z - t) <= 5e+179) tmp = (60.0 * (y / t)) + (a * 120.0); elseif ((z - t) <= 4e+265) tmp = (60.0 * (x / z)) + (a * 120.0); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e+92], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e+179], N[(N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 4e+265], N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{+92}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+179}:\\
\;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\
\mathbf{elif}\;z - t \leq 4 \cdot 10^{+265}:\\
\;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76 or 4.00000000000000027e265 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.1%
if -4.99999999999999991e76 < (-.f64 z t) < 1e92Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.6%
*-commutative83.6%
associate-*l/83.5%
associate-*r/83.7%
Simplified83.7%
if 1e92 < (-.f64 z t) < 5e179Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.6%
associate-*r/92.5%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in z around 0 76.3%
if 5e179 < (-.f64 z t) < 4.00000000000000027e265Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 88.6%
Taylor expanded in y around 0 75.8%
Final simplification78.5%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -5e+76)
(* a 120.0)
(if (<= (- z t) 1e+92)
(* (/ 60.0 (- z t)) (- x y))
(if (<= (- z t) 5e+179)
(+ (* 60.0 (/ y t)) (* a 120.0))
(if (<= (- z t) 4e+232)
(+ (* 60.0 (/ x z)) (* a 120.0))
(+ (* a 120.0) (/ -60.0 (/ z y))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+76) {
tmp = a * 120.0;
} else if ((z - t) <= 1e+92) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((z - t) <= 5e+179) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((z - t) <= 4e+232) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 / (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z - t) <= (-5d+76)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d+92) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if ((z - t) <= 5d+179) then
tmp = (60.0d0 * (y / t)) + (a * 120.0d0)
else if ((z - t) <= 4d+232) then
tmp = (60.0d0 * (x / z)) + (a * 120.0d0)
else
tmp = (a * 120.0d0) + ((-60.0d0) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -5e+76) {
tmp = a * 120.0;
} else if ((z - t) <= 1e+92) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((z - t) <= 5e+179) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((z - t) <= 4e+232) {
tmp = (60.0 * (x / z)) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -5e+76: tmp = a * 120.0 elif (z - t) <= 1e+92: tmp = (60.0 / (z - t)) * (x - y) elif (z - t) <= 5e+179: tmp = (60.0 * (y / t)) + (a * 120.0) elif (z - t) <= 4e+232: tmp = (60.0 * (x / z)) + (a * 120.0) else: tmp = (a * 120.0) + (-60.0 / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -5e+76) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e+92) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (Float64(z - t) <= 5e+179) tmp = Float64(Float64(60.0 * Float64(y / t)) + Float64(a * 120.0)); elseif (Float64(z - t) <= 4e+232) tmp = Float64(Float64(60.0 * Float64(x / z)) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z - t) <= -5e+76) tmp = a * 120.0; elseif ((z - t) <= 1e+92) tmp = (60.0 / (z - t)) * (x - y); elseif ((z - t) <= 5e+179) tmp = (60.0 * (y / t)) + (a * 120.0); elseif ((z - t) <= 4e+232) tmp = (60.0 * (x / z)) + (a * 120.0); else tmp = (a * 120.0) + (-60.0 / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e+92], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e+179], N[(N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 4e+232], N[(N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{+92}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+179}:\\
\;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\
\mathbf{elif}\;z - t \leq 4 \cdot 10^{+232}:\\
\;\;\;\;60 \cdot \frac{x}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z}{y}}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -4.99999999999999991e76 < (-.f64 z t) < 1e92Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.6%
*-commutative83.6%
associate-*l/83.5%
associate-*r/83.7%
Simplified83.7%
if 1e92 < (-.f64 z t) < 5e179Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.6%
associate-*r/92.5%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in z around 0 76.3%
if 5e179 < (-.f64 z t) < 4.00000000000000023e232Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 91.1%
Taylor expanded in y around 0 84.9%
if 4.00000000000000023e232 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 95.9%
associate-*r/96.0%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in z around inf 88.4%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* 60.0 (/ (- x y) z)) (* a 120.0))))
(if (<= z -5e-51)
t_1
(if (<= z -1.6e-250)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= z -6.2e-307)
(+ (* 60.0 (/ y t)) (* a 120.0))
(if (<= z 8e-238)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 8.8e-204)
(+ (* -60.0 (/ x t)) (* a 120.0))
(if (<= z 1.2e+16) (* (/ 60.0 (- z t)) (- x y)) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * ((x - y) / z)) + (a * 120.0);
double tmp;
if (z <= -5e-51) {
tmp = t_1;
} else if (z <= -1.6e-250) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= -6.2e-307) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if (z <= 8e-238) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 8.8e-204) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else if (z <= 1.2e+16) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * ((x - y) / z)) + (a * 120.0d0)
if (z <= (-5d-51)) then
tmp = t_1
else if (z <= (-1.6d-250)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (z <= (-6.2d-307)) then
tmp = (60.0d0 * (y / t)) + (a * 120.0d0)
else if (z <= 8d-238) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 8.8d-204) then
tmp = ((-60.0d0) * (x / t)) + (a * 120.0d0)
else if (z <= 1.2d+16) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * ((x - y) / z)) + (a * 120.0);
double tmp;
if (z <= -5e-51) {
tmp = t_1;
} else if (z <= -1.6e-250) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (z <= -6.2e-307) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if (z <= 8e-238) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 8.8e-204) {
tmp = (-60.0 * (x / t)) + (a * 120.0);
} else if (z <= 1.2e+16) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * ((x - y) / z)) + (a * 120.0) tmp = 0 if z <= -5e-51: tmp = t_1 elif z <= -1.6e-250: tmp = 60.0 / ((z - t) / (x - y)) elif z <= -6.2e-307: tmp = (60.0 * (y / t)) + (a * 120.0) elif z <= 8e-238: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 8.8e-204: tmp = (-60.0 * (x / t)) + (a * 120.0) elif z <= 1.2e+16: tmp = (60.0 / (z - t)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(Float64(x - y) / z)) + Float64(a * 120.0)) tmp = 0.0 if (z <= -5e-51) tmp = t_1; elseif (z <= -1.6e-250) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (z <= -6.2e-307) tmp = Float64(Float64(60.0 * Float64(y / t)) + Float64(a * 120.0)); elseif (z <= 8e-238) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 8.8e-204) tmp = Float64(Float64(-60.0 * Float64(x / t)) + Float64(a * 120.0)); elseif (z <= 1.2e+16) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * ((x - y) / z)) + (a * 120.0); tmp = 0.0; if (z <= -5e-51) tmp = t_1; elseif (z <= -1.6e-250) tmp = 60.0 / ((z - t) / (x - y)); elseif (z <= -6.2e-307) tmp = (60.0 * (y / t)) + (a * 120.0); elseif (z <= 8e-238) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 8.8e-204) tmp = (-60.0 * (x / t)) + (a * 120.0); elseif (z <= 1.2e+16) tmp = (60.0 / (z - t)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e-51], t$95$1, If[LessEqual[z, -1.6e-250], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-307], N[(N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-238], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e-204], N[(N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+16], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -5 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-250}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-307}:\\
\;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-238}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-204}:\\
\;\;\;\;-60 \cdot \frac{x}{t} + a \cdot 120\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.00000000000000004e-51 or 1.2e16 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 89.8%
if -5.00000000000000004e-51 < z < -1.60000000000000002e-250Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.2%
expm1-log1p-u43.1%
expm1-udef27.8%
associate-*r/27.8%
associate-/l*27.8%
Applied egg-rr27.8%
expm1-def43.1%
expm1-log1p81.3%
Simplified81.3%
if -1.60000000000000002e-250 < z < -6.1999999999999996e-307Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 89.9%
associate-*r/89.9%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in z around 0 89.9%
if -6.1999999999999996e-307 < z < 7.9999999999999999e-238Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
if 7.9999999999999999e-238 < z < 8.7999999999999993e-204Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 99.7%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 99.7%
if 8.7999999999999993e-204 < z < 1.2e16Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 70.9%
*-commutative70.9%
associate-*l/70.8%
associate-*r/71.0%
Simplified71.0%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+76) (not (<= (- z t) 1e+92))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+92)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-5d+76)) .or. (.not. ((z - t) <= 1d+92))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+92)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+76) or not ((z - t) <= 1e+92): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e+76) || !(Float64(z - t) <= 1e+92)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e+76) || ~(((z - t) <= 1e+92))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e+92]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 10^{+92}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76 or 1e92 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.3%
if -4.99999999999999991e76 < (-.f64 z t) < 1e92Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.6%
Final simplification76.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+76) (not (<= (- z t) 1e+92))) (* a 120.0) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+92)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-5d+76)) .or. (.not. ((z - t) <= 1d+92))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - t)) * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+92)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+76) or not ((z - t) <= 1e+92): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e+76) || !(Float64(z - t) <= 1e+92)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e+76) || ~(((z - t) <= 1e+92))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e+92]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 10^{+92}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76 or 1e92 < (-.f64 z t) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.3%
if -4.99999999999999991e76 < (-.f64 z t) < 1e92Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.6%
*-commutative83.6%
associate-*l/83.5%
associate-*r/83.7%
Simplified83.7%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+76) (not (<= (- z t) 2e+68))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 2e+68)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-5d+76)) .or. (.not. ((z - t) <= 2d+68))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 2e+68)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+76) or not ((z - t) <= 2e+68): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e+76) || !(Float64(z - t) <= 2e+68)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e+76) || ~(((z - t) <= 2e+68))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[Not[LessEqual[N[(z - t), $MachinePrecision], 2e+68]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 2 \cdot 10^{+68}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76 or 1.99999999999999991e68 < (-.f64 z t) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.2%
if -4.99999999999999991e76 < (-.f64 z t) < 1.99999999999999991e68Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 47.0%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -5e+76) (not (<= (- z t) 1e+77))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+77)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((z - t) <= (-5d+76)) .or. (.not. ((z - t) <= 1d+77))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -5e+76) || !((z - t) <= 1e+77)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -5e+76) or not ((z - t) <= 1e+77): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -5e+76) || !(Float64(z - t) <= 1e+77)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -5e+76) || ~(((z - t) <= 1e+77))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -5e+76], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e+77]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -5 \cdot 10^{+76} \lor \neg \left(z - t \leq 10^{+77}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (-.f64 z t) < -4.99999999999999991e76 or 9.99999999999999983e76 < (-.f64 z t) Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 69.8%
if -4.99999999999999991e76 < (-.f64 z t) < 9.99999999999999983e76Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.5%
Taylor expanded in z around 0 56.7%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.8e-76) (not (<= z 3.2e+14))) (+ (* 60.0 (/ (- x y) z)) (* a 120.0)) (+ (/ -60.0 (/ t (- x y))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.8e-76) || !(z <= 3.2e+14)) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else {
tmp = (-60.0 / (t / (x - y))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-9.8d-76)) .or. (.not. (z <= 3.2d+14))) then
tmp = (60.0d0 * ((x - y) / z)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / (t / (x - y))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.8e-76) || !(z <= 3.2e+14)) {
tmp = (60.0 * ((x - y) / z)) + (a * 120.0);
} else {
tmp = (-60.0 / (t / (x - y))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.8e-76) or not (z <= 3.2e+14): tmp = (60.0 * ((x - y) / z)) + (a * 120.0) else: tmp = (-60.0 / (t / (x - y))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.8e-76) || !(z <= 3.2e+14)) tmp = Float64(Float64(60.0 * Float64(Float64(x - y) / z)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(t / Float64(x - y))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.8e-76) || ~((z <= 3.2e+14))) tmp = (60.0 * ((x - y) / z)) + (a * 120.0); else tmp = (-60.0 / (t / (x - y))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.8e-76], N[Not[LessEqual[z, 3.2e+14]], $MachinePrecision]], N[(N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{-76} \lor \neg \left(z \leq 3.2 \cdot 10^{+14}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x - y}} + a \cdot 120\\
\end{array}
\end{array}
if z < -9.79999999999999944e-76 or 3.2e14 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 89.0%
if -9.79999999999999944e-76 < z < 3.2e14Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 87.4%
associate-*r/87.5%
associate-/l*87.5%
Simplified87.5%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.4e+96) (not (<= x 1.35e+76))) (+ (/ x (/ (- z t) 60.0)) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.4e+96) || !(x <= 1.35e+76)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2.4d+96)) .or. (.not. (x <= 1.35d+76))) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.4e+96) || !(x <= 1.35e+76)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.4e+96) or not (x <= 1.35e+76): tmp = (x / ((z - t) / 60.0)) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.4e+96) || !(x <= 1.35e+76)) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.4e+96) || ~((x <= 1.35e+76))) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.4e+96], N[Not[LessEqual[x, 1.35e+76]], $MachinePrecision]], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+96} \lor \neg \left(x \leq 1.35 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.39999999999999993e96 or 1.34999999999999995e76 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.2%
associate-*r/96.3%
*-commutative96.3%
associate-/l*96.4%
Simplified96.4%
if -2.39999999999999993e96 < x < 1.34999999999999995e76Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 91.3%
associate-*r/91.4%
associate-/l*91.3%
Simplified91.3%
Final simplification93.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.6e+98) (not (<= x 5.5e+74))) (+ (/ x (/ (- z t) 60.0)) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.6e+98) || !(x <= 5.5e+74)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-3.6d+98)) .or. (.not. (x <= 5.5d+74))) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.6e+98) || !(x <= 5.5e+74)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.6e+98) or not (x <= 5.5e+74): tmp = (x / ((z - t) / 60.0)) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.6e+98) || !(x <= 5.5e+74)) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.6e+98) || ~((x <= 5.5e+74))) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.6e+98], N[Not[LessEqual[x, 5.5e+74]], $MachinePrecision]], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+98} \lor \neg \left(x \leq 5.5 \cdot 10^{+74}\right):\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -3.59999999999999981e98 or 5.5000000000000003e74 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.2%
associate-*r/96.3%
*-commutative96.3%
associate-/l*96.4%
Simplified96.4%
if -3.59999999999999981e98 < x < 5.5000000000000003e74Initial program 99.8%
Taylor expanded in x around 0 91.4%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.3e+95)
(+ (/ x (/ (- z t) 60.0)) (* a 120.0))
(if (<= x 3.5e+70)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(+ (/ (* 60.0 x) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+95) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 3.5e+70) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.3d+95)) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else if (x <= 3.5d+70) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+95) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else if (x <= 3.5e+70) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.3e+95: tmp = (x / ((z - t) / 60.0)) + (a * 120.0) elif x <= 3.5e+70: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.3e+95) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); elseif (x <= 3.5e+70) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.3e+95) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); elseif (x <= 3.5e+70) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 * x) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.3e+95], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+70], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+70}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.29999999999999995e95Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 99.7%
associate-*r/99.8%
*-commutative99.8%
associate-/l*100.0%
Simplified100.0%
if -1.29999999999999995e95 < x < 3.50000000000000002e70Initial program 99.8%
Taylor expanded in x around 0 91.4%
if 3.50000000000000002e70 < x Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 93.5%
associate-*r/93.6%
*-commutative93.6%
Simplified93.6%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -8e-106)
(and (not (<= z 3.9e-237)) (or (<= z 2.2e-206) (not (<= z 2e-80)))))
(* a 120.0)
(/ -60.0 (/ (- t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-106) || (!(z <= 3.9e-237) && ((z <= 2.2e-206) || !(z <= 2e-80)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (-t / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8d-106)) .or. (.not. (z <= 3.9d-237)) .and. (z <= 2.2d-206) .or. (.not. (z <= 2d-80))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / (-t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-106) || (!(z <= 3.9e-237) && ((z <= 2.2e-206) || !(z <= 2e-80)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 / (-t / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e-106) or (not (z <= 3.9e-237) and ((z <= 2.2e-206) or not (z <= 2e-80))): tmp = a * 120.0 else: tmp = -60.0 / (-t / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e-106) || (!(z <= 3.9e-237) && ((z <= 2.2e-206) || !(z <= 2e-80)))) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(Float64(-t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e-106) || (~((z <= 3.9e-237)) && ((z <= 2.2e-206) || ~((z <= 2e-80))))) tmp = a * 120.0; else tmp = -60.0 / (-t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e-106], And[N[Not[LessEqual[z, 3.9e-237]], $MachinePrecision], Or[LessEqual[z, 2.2e-206], N[Not[LessEqual[z, 2e-80]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[((-t) / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-106} \lor \neg \left(z \leq 3.9 \cdot 10^{-237}\right) \land \left(z \leq 2.2 \cdot 10^{-206} \lor \neg \left(z \leq 2 \cdot 10^{-80}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{-t}{y}}\\
\end{array}
\end{array}
if z < -7.99999999999999953e-106 or 3.8999999999999998e-237 < z < 2.1999999999999999e-206 or 1.99999999999999992e-80 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.8%
if -7.99999999999999953e-106 < z < 3.8999999999999998e-237 or 2.1999999999999999e-206 < z < 1.99999999999999992e-80Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 48.5%
associate-*r/48.5%
associate-/l*48.5%
Applied egg-rr48.5%
Taylor expanded in z around 0 46.7%
mul-1-neg46.7%
distribute-neg-frac46.7%
Simplified46.7%
Final simplification55.5%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -1.9e-106)
(and (not (<= z 2.2e-237))
(or (<= z 1.52e-207) (not (<= z 5.2e-85)))))
(* a 120.0)
(* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-106) || (!(z <= 2.2e-237) && ((z <= 1.52e-207) || !(z <= 5.2e-85)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d-106)) .or. (.not. (z <= 2.2d-237)) .and. (z <= 1.52d-207) .or. (.not. (z <= 5.2d-85))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-106) || (!(z <= 2.2e-237) && ((z <= 1.52e-207) || !(z <= 5.2e-85)))) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e-106) or (not (z <= 2.2e-237) and ((z <= 1.52e-207) or not (z <= 5.2e-85))): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e-106) || (!(z <= 2.2e-237) && ((z <= 1.52e-207) || !(z <= 5.2e-85)))) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e-106) || (~((z <= 2.2e-237)) && ((z <= 1.52e-207) || ~((z <= 5.2e-85))))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e-106], And[N[Not[LessEqual[z, 2.2e-237]], $MachinePrecision], Or[LessEqual[z, 1.52e-207], N[Not[LessEqual[z, 5.2e-85]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-106} \lor \neg \left(z \leq 2.2 \cdot 10^{-237}\right) \land \left(z \leq 1.52 \cdot 10^{-207} \lor \neg \left(z \leq 5.2 \cdot 10^{-85}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -1.9e-106 or 2.19999999999999998e-237 < z < 1.52000000000000005e-207 or 5.20000000000000023e-85 < z Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.8%
if -1.9e-106 < z < 2.19999999999999998e-237 or 1.52000000000000005e-207 < z < 5.20000000000000023e-85Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 48.5%
Taylor expanded in z around 0 46.7%
Final simplification55.5%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+247) (not (<= y 1e+188))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+247) || !(y <= 1e+188)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-5.8d+247)) .or. (.not. (y <= 1d+188))) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+247) || !(y <= 1e+188)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+247) or not (y <= 1e+188): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+247) || !(y <= 1e+188)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.8e+247) || ~((y <= 1e+188))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+247], N[Not[LessEqual[y, 1e+188]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+247} \lor \neg \left(y \leq 10^{+188}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -5.8000000000000004e247 or 1e188 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 82.7%
Taylor expanded in z around inf 51.0%
if -5.8000000000000004e247 < y < 1e188Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.8%
Final simplification51.7%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 46.5%
Final simplification46.5%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023326
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))