
(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 14 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 (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (((x - y) / (z - t)) * 60.0));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0)) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{z - t} \cdot 60\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
*-commutative99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (* 60.0 (/ x (- z t)))))
(if (<= (- z t) -2e+127)
(* a 120.0)
(if (<= (- z t) -5e+70)
t_1
(if (<= (- z t) -20000000.0)
t_2
(if (<= (- z t) 1e-17)
t_1
(if (<= (- z t) 2e+58)
t_2
(if (<= (- z t) 5e+82) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = t_1;
} else if ((z - t) <= -20000000.0) {
tmp = t_2;
} else if ((z - t) <= 1e-17) {
tmp = t_1;
} else if ((z - t) <= 2e+58) {
tmp = t_2;
} else if ((z - t) <= 5e+82) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = 60.0d0 * (x / (z - t))
if ((z - t) <= (-2d+127)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+70)) then
tmp = t_1
else if ((z - t) <= (-20000000.0d0)) then
tmp = t_2
else if ((z - t) <= 1d-17) then
tmp = t_1
else if ((z - t) <= 2d+58) then
tmp = t_2
else if ((z - t) <= 5d+82) then
tmp = t_1
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 t_1 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = t_1;
} else if ((z - t) <= -20000000.0) {
tmp = t_2;
} else if ((z - t) <= 1e-17) {
tmp = t_1;
} else if ((z - t) <= 2e+58) {
tmp = t_2;
} else if ((z - t) <= 5e+82) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = 60.0 * (x / (z - t)) tmp = 0 if (z - t) <= -2e+127: tmp = a * 120.0 elif (z - t) <= -5e+70: tmp = t_1 elif (z - t) <= -20000000.0: tmp = t_2 elif (z - t) <= 1e-17: tmp = t_1 elif (z - t) <= 2e+58: tmp = t_2 elif (z - t) <= 5e+82: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (Float64(z - t) <= -2e+127) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+70) tmp = t_1; elseif (Float64(z - t) <= -20000000.0) tmp = t_2; elseif (Float64(z - t) <= 1e-17) tmp = t_1; elseif (Float64(z - t) <= 2e+58) tmp = t_2; elseif (Float64(z - t) <= 5e+82) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = 60.0 * (x / (z - t)); tmp = 0.0; if ((z - t) <= -2e+127) tmp = a * 120.0; elseif ((z - t) <= -5e+70) tmp = t_1; elseif ((z - t) <= -20000000.0) tmp = t_2; elseif ((z - t) <= 1e-17) tmp = t_1; elseif ((z - t) <= 2e+58) tmp = t_2; elseif ((z - t) <= 5e+82) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -2e+127], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+70], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], -20000000.0], t$95$2, If[LessEqual[N[(z - t), $MachinePrecision], 1e-17], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], 2e+58], t$95$2, If[LessEqual[N[(z - t), $MachinePrecision], 5e+82], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq -20000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z - t \leq 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{+58}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.4%
if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70 or -2e7 < (-.f64 z t) < 1.00000000000000007e-17 or 1.99999999999999989e58 < (-.f64 z t) < 5.00000000000000015e82Initial program 98.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/98.7%
*-un-lft-identity98.7%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 60.7%
if -5.0000000000000002e70 < (-.f64 z t) < -2e7 or 1.00000000000000007e-17 < (-.f64 z t) < 1.99999999999999989e58Initial program 95.4%
associate-/l*99.4%
Simplified99.4%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/95.4%
*-un-lft-identity95.4%
times-frac99.9%
metadata-eval99.9%
metadata-eval99.9%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 69.0%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= (- z t) -2e+127)
(* a 120.0)
(if (<= (- z t) -5e+70)
t_1
(if (<= (- z t) -20000000.0)
(* 60.0 (/ x (- z t)))
(if (<= (- z t) 1e-90)
t_1
(if (<= (- z t) 5e+82) (* 60.0 (/ (- x y) z)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = t_1;
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = t_1;
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - 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) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
if ((z - t) <= (-2d+127)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+70)) then
tmp = t_1
else if ((z - t) <= (-20000000.0d0)) then
tmp = 60.0d0 * (x / (z - t))
else if ((z - t) <= 1d-90) then
tmp = t_1
else if ((z - t) <= 5d+82) then
tmp = 60.0d0 * ((x - 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 t_1 = -60.0 * (y / (z - t));
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = t_1;
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = t_1;
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if (z - t) <= -2e+127: tmp = a * 120.0 elif (z - t) <= -5e+70: tmp = t_1 elif (z - t) <= -20000000.0: tmp = 60.0 * (x / (z - t)) elif (z - t) <= 1e-90: tmp = t_1 elif (z - t) <= 5e+82: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (Float64(z - t) <= -2e+127) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+70) tmp = t_1; elseif (Float64(z - t) <= -20000000.0) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(z - t) <= 1e-90) tmp = t_1; elseif (Float64(z - t) <= 5e+82) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if ((z - t) <= -2e+127) tmp = a * 120.0; elseif ((z - t) <= -5e+70) tmp = t_1; elseif ((z - t) <= -20000000.0) tmp = 60.0 * (x / (z - t)); elseif ((z - t) <= 1e-90) tmp = t_1; elseif ((z - t) <= 5e+82) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z - t), $MachinePrecision], -2e+127], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+70], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], -20000000.0], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-90], t$95$1, If[LessEqual[N[(z - t), $MachinePrecision], 5e+82], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq -20000000:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.4%
if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70 or -2e7 < (-.f64 z t) < 9.99999999999999995e-91Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 57.9%
if -5.0000000000000002e70 < (-.f64 z t) < -2e7Initial program 89.6%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/89.6%
*-un-lft-identity89.6%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.7%
if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82Initial program 97.0%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 91.9%
Taylor expanded in z around inf 62.2%
Final simplification66.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -2e+127)
(* a 120.0)
(if (<= (- z t) -5e+70)
(* y (/ -60.0 (- z t)))
(if (<= (- z t) -20000000.0)
(* 60.0 (/ x (- z t)))
(if (<= (- z t) 1e-90)
(* -60.0 (/ y (- z t)))
(if (<= (- z t) 5e+82) (* 60.0 (/ (- x y) z)) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = y * (-60.0 / (z - t));
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - 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 ((z - t) <= (-2d+127)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+70)) then
tmp = y * ((-60.0d0) / (z - t))
else if ((z - t) <= (-20000000.0d0)) then
tmp = 60.0d0 * (x / (z - t))
else if ((z - t) <= 1d-90) then
tmp = (-60.0d0) * (y / (z - t))
else if ((z - t) <= 5d+82) then
tmp = 60.0d0 * ((x - 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 ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = y * (-60.0 / (z - t));
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+127: tmp = a * 120.0 elif (z - t) <= -5e+70: tmp = y * (-60.0 / (z - t)) elif (z - t) <= -20000000.0: tmp = 60.0 * (x / (z - t)) elif (z - t) <= 1e-90: tmp = -60.0 * (y / (z - t)) elif (z - t) <= 5e+82: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+127) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+70) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (Float64(z - t) <= -20000000.0) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(z - t) <= 1e-90) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(z - t) <= 5e+82) tmp = Float64(60.0 * Float64(Float64(x - 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 ((z - t) <= -2e+127) tmp = a * 120.0; elseif ((z - t) <= -5e+70) tmp = y * (-60.0 / (z - t)); elseif ((z - t) <= -20000000.0) tmp = 60.0 * (x / (z - t)); elseif ((z - t) <= 1e-90) tmp = -60.0 * (y / (z - t)); elseif ((z - t) <= 5e+82) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+127], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+70], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -20000000.0], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e+82], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;z - t \leq -20000000:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-90}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.4%
if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 70.9%
associate-*r/70.9%
*-commutative70.9%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in x around 0 59.0%
associate-*r/59.0%
associate-/l*59.1%
associate-/r/59.0%
metadata-eval59.0%
distribute-neg-frac59.0%
distribute-lft-neg-in59.0%
*-commutative59.0%
distribute-rgt-neg-in59.0%
distribute-neg-frac59.0%
metadata-eval59.0%
Simplified59.0%
if -5.0000000000000002e70 < (-.f64 z t) < -2e7Initial program 89.6%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/89.6%
*-un-lft-identity89.6%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.7%
if -2e7 < (-.f64 z t) < 9.99999999999999995e-91Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 57.6%
if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82Initial program 97.0%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 91.9%
Taylor expanded in z around inf 62.2%
Final simplification66.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -2e+127)
(* a 120.0)
(if (<= (- z t) -5e+70)
(/ (* y -60.0) (- z t))
(if (<= (- z t) -20000000.0)
(* 60.0 (/ x (- z t)))
(if (<= (- z t) 1e-90)
(* -60.0 (/ y (- z t)))
(if (<= (- z t) 5e+82) (* 60.0 (/ (- x y) z)) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = (y * -60.0) / (z - t);
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - 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 ((z - t) <= (-2d+127)) then
tmp = a * 120.0d0
else if ((z - t) <= (-5d+70)) then
tmp = (y * (-60.0d0)) / (z - t)
else if ((z - t) <= (-20000000.0d0)) then
tmp = 60.0d0 * (x / (z - t))
else if ((z - t) <= 1d-90) then
tmp = (-60.0d0) * (y / (z - t))
else if ((z - t) <= 5d+82) then
tmp = 60.0d0 * ((x - 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 ((z - t) <= -2e+127) {
tmp = a * 120.0;
} else if ((z - t) <= -5e+70) {
tmp = (y * -60.0) / (z - t);
} else if ((z - t) <= -20000000.0) {
tmp = 60.0 * (x / (z - t));
} else if ((z - t) <= 1e-90) {
tmp = -60.0 * (y / (z - t));
} else if ((z - t) <= 5e+82) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -2e+127: tmp = a * 120.0 elif (z - t) <= -5e+70: tmp = (y * -60.0) / (z - t) elif (z - t) <= -20000000.0: tmp = 60.0 * (x / (z - t)) elif (z - t) <= 1e-90: tmp = -60.0 * (y / (z - t)) elif (z - t) <= 5e+82: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -2e+127) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= -5e+70) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (Float64(z - t) <= -20000000.0) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(z - t) <= 1e-90) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (Float64(z - t) <= 5e+82) tmp = Float64(60.0 * Float64(Float64(x - 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 ((z - t) <= -2e+127) tmp = a * 120.0; elseif ((z - t) <= -5e+70) tmp = (y * -60.0) / (z - t); elseif ((z - t) <= -20000000.0) tmp = 60.0 * (x / (z - t)); elseif ((z - t) <= 1e-90) tmp = -60.0 * (y / (z - t)); elseif ((z - t) <= 5e+82) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -2e+127], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -5e+70], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], -20000000.0], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-90], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 5e+82], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq -5 \cdot 10^{+70}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;z - t \leq -20000000:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;z - t \leq 10^{-90}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;z - t \leq 5 \cdot 10^{+82}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 72.4%
if -1.99999999999999991e127 < (-.f64 z t) < -5.0000000000000002e70Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-un-lft-identity99.7%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 59.0%
associate-*r/59.0%
Simplified59.0%
if -5.0000000000000002e70 < (-.f64 z t) < -2e7Initial program 89.6%
associate-/l*99.3%
Simplified99.3%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/89.6%
*-un-lft-identity89.6%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.7%
if -2e7 < (-.f64 z t) < 9.99999999999999995e-91Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 57.6%
if 9.99999999999999995e-91 < (-.f64 z t) < 5.00000000000000015e82Initial program 97.0%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 91.9%
Taylor expanded in z around inf 62.2%
Final simplification66.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ 60.0 (/ z (- x y))) (* a 120.0))))
(if (<= z -5.2e-127)
t_1
(if (<= z 5e-165)
(+ (* (- x y) (/ -60.0 t)) (* a 120.0))
(if (<= z 1.42e+80) (* (/ (- x y) (- z t)) 60.0) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z / (x - y))) + (a * 120.0);
double tmp;
if (z <= -5.2e-127) {
tmp = t_1;
} else if (z <= 5e-165) {
tmp = ((x - y) * (-60.0 / t)) + (a * 120.0);
} else if (z <= 1.42e+80) {
tmp = ((x - y) / (z - t)) * 60.0;
} 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 / (z / (x - y))) + (a * 120.0d0)
if (z <= (-5.2d-127)) then
tmp = t_1
else if (z <= 5d-165) then
tmp = ((x - y) * ((-60.0d0) / t)) + (a * 120.0d0)
else if (z <= 1.42d+80) then
tmp = ((x - y) / (z - t)) * 60.0d0
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 / (z / (x - y))) + (a * 120.0);
double tmp;
if (z <= -5.2e-127) {
tmp = t_1;
} else if (z <= 5e-165) {
tmp = ((x - y) * (-60.0 / t)) + (a * 120.0);
} else if (z <= 1.42e+80) {
tmp = ((x - y) / (z - t)) * 60.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / (z / (x - y))) + (a * 120.0) tmp = 0 if z <= -5.2e-127: tmp = t_1 elif z <= 5e-165: tmp = ((x - y) * (-60.0 / t)) + (a * 120.0) elif z <= 1.42e+80: tmp = ((x - y) / (z - t)) * 60.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / Float64(z / Float64(x - y))) + Float64(a * 120.0)) tmp = 0.0 if (z <= -5.2e-127) tmp = t_1; elseif (z <= 5e-165) tmp = Float64(Float64(Float64(x - y) * Float64(-60.0 / t)) + Float64(a * 120.0)); elseif (z <= 1.42e+80) tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / (z / (x - y))) + (a * 120.0); tmp = 0.0; if (z <= -5.2e-127) tmp = t_1; elseif (z <= 5e-165) tmp = ((x - y) * (-60.0 / t)) + (a * 120.0); elseif (z <= 1.42e+80) tmp = ((x - y) / (z - t)) * 60.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e-127], t$95$1, If[LessEqual[z, 5e-165], N[(N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+80], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{\frac{z}{x - y}} + a \cdot 120\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{-127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-165}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t} + a \cdot 120\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+80}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.19999999999999982e-127 or 1.4200000000000001e80 < z Initial program 99.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 87.5%
if -5.19999999999999982e-127 < z < 4.99999999999999981e-165Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 95.1%
associate-*r/95.1%
Simplified95.1%
associate-/l*95.1%
associate-/r/95.1%
Applied egg-rr95.1%
if 4.99999999999999981e-165 < z < 1.4200000000000001e80Initial program 97.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.3%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -2e+127) (not (<= (- z t) 5e+82))) (+ (* x (/ 60.0 (- z t))) (* a 120.0)) (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -2e+127) || !((z - t) <= 5e+82)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.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) <= (-2d+127)) .or. (.not. ((z - t) <= 5d+82))) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = ((x - y) / (z - t)) * 60.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) <= -2e+127) || !((z - t) <= 5e+82)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -2e+127) or not ((z - t) <= 5e+82): tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -2e+127) || !(Float64(z - t) <= 5e+82)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -2e+127) || ~(((z - t) <= 5e+82))) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -2e+127], N[Not[LessEqual[N[(z - t), $MachinePrecision], 5e+82]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -2 \cdot 10^{+127} \lor \neg \left(z - t \leq 5 \cdot 10^{+82}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (-.f64 z t) < -1.99999999999999991e127 or 5.00000000000000015e82 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.0%
associate-*r/87.0%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
if -1.99999999999999991e127 < (-.f64 z t) < 5.00000000000000015e82Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.1%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e+48) (not (<= (* a 120.0) 4e+57))) (* a 120.0) (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e+48) || !((a * 120.0) <= 4e+57)) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.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 (((a * 120.0d0) <= (-5d+48)) .or. (.not. ((a * 120.0d0) <= 4d+57))) then
tmp = a * 120.0d0
else
tmp = ((x - y) / (z - t)) * 60.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e+48) || !((a * 120.0) <= 4e+57)) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e+48) or not ((a * 120.0) <= 4e+57): tmp = a * 120.0 else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e+48) || !(Float64(a * 120.0) <= 4e+57)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5e+48) || ~(((a * 120.0) <= 4e+57))) tmp = a * 120.0; else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+48], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+57]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+48} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{+57}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999973e48 or 4.00000000000000019e57 < (*.f64 a 120) Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.1%
if -4.99999999999999973e48 < (*.f64 a 120) < 4.00000000000000019e57Initial program 99.0%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 76.8%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.5e+50) (not (<= y 3.8e-14))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (+ (* x (/ 60.0 (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.5e+50) || !(y <= 3.8e-14)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x * (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 ((y <= (-6.5d+50)) .or. (.not. (y <= 3.8d-14))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = (x * (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 ((y <= -6.5e+50) || !(y <= 3.8e-14)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.5e+50) or not (y <= 3.8e-14): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = (x * (60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.5e+50) || !(y <= 3.8e-14)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(x * Float64(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 ((y <= -6.5e+50) || ~((y <= 3.8e-14))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = (x * (60.0 / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.5e+50], N[Not[LessEqual[y, 3.8e-14]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+50} \lor \neg \left(y \leq 3.8 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -6.5000000000000003e50 or 3.8000000000000002e-14 < y Initial program 98.9%
Taylor expanded in x around 0 89.3%
if -6.5000000000000003e50 < y < 3.8000000000000002e-14Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
associate-*r/91.8%
associate-*l/92.6%
*-commutative92.6%
Simplified92.6%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7e-223)
(* a 120.0)
(if (<= a 5.5e-261)
(* -60.0 (/ y z))
(if (<= a 2.8e-121) (* 60.0 (/ x z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7e-223) {
tmp = a * 120.0;
} else if (a <= 5.5e-261) {
tmp = -60.0 * (y / z);
} else if (a <= 2.8e-121) {
tmp = 60.0 * (x / 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 (a <= (-7d-223)) then
tmp = a * 120.0d0
else if (a <= 5.5d-261) then
tmp = (-60.0d0) * (y / z)
else if (a <= 2.8d-121) then
tmp = 60.0d0 * (x / 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 (a <= -7e-223) {
tmp = a * 120.0;
} else if (a <= 5.5e-261) {
tmp = -60.0 * (y / z);
} else if (a <= 2.8e-121) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7e-223: tmp = a * 120.0 elif a <= 5.5e-261: tmp = -60.0 * (y / z) elif a <= 2.8e-121: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7e-223) tmp = Float64(a * 120.0); elseif (a <= 5.5e-261) tmp = Float64(-60.0 * Float64(y / z)); elseif (a <= 2.8e-121) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7e-223) tmp = a * 120.0; elseif (a <= 5.5e-261) tmp = -60.0 * (y / z); elseif (a <= 2.8e-121) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7e-223], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.5e-261], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-121], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-223}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-261}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-121}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.00000000000000018e-223 or 2.8000000000000001e-121 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.8%
if -7.00000000000000018e-223 < a < 5.50000000000000042e-261Initial program 99.4%
associate-/l*99.4%
Simplified99.4%
associate-/r/99.5%
Applied egg-rr99.5%
associate-*l/99.4%
*-un-lft-identity99.4%
times-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
times-frac99.5%
*-un-lft-identity99.5%
*-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 65.7%
Taylor expanded in z around inf 46.1%
if 5.50000000000000042e-261 < a < 2.8000000000000001e-121Initial program 96.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 88.8%
Taylor expanded in z around inf 53.5%
Taylor expanded in x around inf 43.1%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.4e-92) (not (<= a 1e+21))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e-92) || !(a <= 1e+21)) {
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 ((a <= (-5.4d-92)) .or. (.not. (a <= 1d+21))) 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 ((a <= -5.4e-92) || !(a <= 1e+21)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.4e-92) or not (a <= 1e+21): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.4e-92) || !(a <= 1e+21)) 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 ((a <= -5.4e-92) || ~((a <= 1e+21))) 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[a, -5.4e-92], N[Not[LessEqual[a, 1e+21]], $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}\;a \leq -5.4 \cdot 10^{-92} \lor \neg \left(a \leq 10^{+21}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -5.3999999999999999e-92 or 1e21 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.1%
if -5.3999999999999999e-92 < a < 1e21Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
associate-*l/98.8%
*-un-lft-identity98.8%
times-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
times-frac99.6%
*-un-lft-identity99.6%
*-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 49.0%
Final simplification62.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7e-223) (not (<= a 1.5e-143))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e-223) || !(a <= 1.5e-143)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
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 ((a <= (-7d-223)) .or. (.not. (a <= 1.5d-143))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e-223) || !(a <= 1.5e-143)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7e-223) or not (a <= 1.5e-143): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7e-223) || !(a <= 1.5e-143)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7e-223) || ~((a <= 1.5e-143))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7e-223], N[Not[LessEqual[a, 1.5e-143]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-223} \lor \neg \left(a \leq 1.5 \cdot 10^{-143}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -7.00000000000000018e-223 or 1.49999999999999993e-143 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.4%
if -7.00000000000000018e-223 < a < 1.49999999999999993e-143Initial program 98.0%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
associate-*l/98.0%
*-un-lft-identity98.0%
times-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
times-frac99.5%
*-un-lft-identity99.5%
*-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 53.3%
Taylor expanded in z around inf 32.3%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(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.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 49.1%
Final simplification49.1%
(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 2024020
(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)))