
(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 (+ (* (- 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.8%
*-commutative99.8%
associate-/l*99.8%
Applied egg-rr99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+61)
(+ (* a 120.0) (* y (/ -60.0 z)))
(if (<= (* a 120.0) -1.5e-80)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 1e+46) (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+61) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -1.5e-80) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e+46) {
tmp = (x - y) * (60.0 / (z - t));
} 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 * 120.0d0) <= (-5d+61)) then
tmp = (a * 120.0d0) + (y * ((-60.0d0) / z))
else if ((a * 120.0d0) <= (-1.5d-80)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 1d+46) then
tmp = (x - y) * (60.0d0 / (z - t))
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 * 120.0) <= -5e+61) {
tmp = (a * 120.0) + (y * (-60.0 / z));
} else if ((a * 120.0) <= -1.5e-80) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1e+46) {
tmp = (x - y) * (60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+61: tmp = (a * 120.0) + (y * (-60.0 / z)) elif (a * 120.0) <= -1.5e-80: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 1e+46: tmp = (x - y) * (60.0 / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+61) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(-60.0 / z))); elseif (Float64(a * 120.0) <= -1.5e-80) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 1e+46) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+61) tmp = (a * 120.0) + (y * (-60.0 / z)); elseif ((a * 120.0) <= -1.5e-80) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 1e+46) tmp = (x - y) * (60.0 / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+61], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1.5e-80], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+46], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+61}:\\
\;\;\;\;a \cdot 120 + y \cdot \frac{-60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -1.5 \cdot 10^{-80}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+46}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000018e61Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 93.4%
associate-*r/93.3%
*-commutative93.3%
*-lft-identity93.3%
times-frac93.3%
/-rgt-identity93.3%
metadata-eval93.3%
distribute-neg-frac93.3%
distribute-neg-frac293.3%
neg-sub093.3%
sub-neg93.3%
+-commutative93.3%
associate--r+93.3%
neg-sub093.3%
remove-double-neg93.3%
Simplified93.3%
Taylor expanded in t around 0 90.3%
if -5.00000000000000018e61 < (*.f64 a #s(literal 120 binary64)) < -1.50000000000000004e-80Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 87.2%
associate-*r/87.2%
Simplified87.2%
Taylor expanded in z around 0 65.4%
if -1.50000000000000004e-80 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999999e45Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 79.1%
associate-*r/79.0%
Simplified79.0%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr79.1%
if 9.9999999999999999e45 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 85.0%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1.5e-80) (not (<= (* a 120.0) 1e+46))) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1.5e-80) || !((a * 120.0) <= 1e+46)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (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 * 120.0d0) <= (-1.5d-80)) .or. (.not. ((a * 120.0d0) <= 1d+46))) then
tmp = a * 120.0d0
else
tmp = (x - y) * (60.0d0 / (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 * 120.0) <= -1.5e-80) || !((a * 120.0) <= 1e+46)) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1.5e-80) or not ((a * 120.0) <= 1e+46): tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1.5e-80) || !(Float64(a * 120.0) <= 1e+46)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1.5e-80) || ~(((a * 120.0) <= 1e+46))) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1.5e-80], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+46]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1.5 \cdot 10^{-80} \lor \neg \left(a \cdot 120 \leq 10^{+46}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.50000000000000004e-80 or 9.9999999999999999e45 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.4%
if -1.50000000000000004e-80 < (*.f64 a #s(literal 120 binary64)) < 9.9999999999999999e45Initial program 99.7%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 79.1%
associate-*r/79.0%
Simplified79.0%
*-commutative99.7%
associate-/l*99.8%
Applied egg-rr79.1%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.4e+32) (not (<= y 3.5e-41))) (+ (* a 120.0) (* y (/ 60.0 (- t z)))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.4e+32) || !(y <= 3.5e-41)) {
tmp = (a * 120.0) + (y * (60.0 / (t - z)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (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 ((y <= (-2.4d+32)) .or. (.not. (y <= 3.5d-41))) then
tmp = (a * 120.0d0) + (y * (60.0d0 / (t - z)))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (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 ((y <= -2.4e+32) || !(y <= 3.5e-41)) {
tmp = (a * 120.0) + (y * (60.0 / (t - z)));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.4e+32) or not (y <= 3.5e-41): tmp = (a * 120.0) + (y * (60.0 / (t - z))) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.4e+32) || !(y <= 3.5e-41)) tmp = Float64(Float64(a * 120.0) + Float64(y * Float64(60.0 / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.4e+32) || ~((y <= 3.5e-41))) tmp = (a * 120.0) + (y * (60.0 / (t - z))); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.4e+32], N[Not[LessEqual[y, 3.5e-41]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+32} \lor \neg \left(y \leq 3.5 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120 + y \cdot \frac{60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -2.39999999999999991e32 or 3.5e-41 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.7%
associate-*r/88.7%
*-commutative88.7%
*-lft-identity88.7%
times-frac88.7%
/-rgt-identity88.7%
metadata-eval88.7%
distribute-neg-frac88.7%
distribute-neg-frac288.7%
neg-sub088.7%
sub-neg88.7%
+-commutative88.7%
associate--r+88.7%
neg-sub088.7%
remove-double-neg88.7%
Simplified88.7%
if -2.39999999999999991e32 < y < 3.5e-41Initial program 99.8%
*-commutative99.8%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 98.1%
associate-*r/98.1%
*-commutative98.1%
associate-*r/98.2%
Simplified98.2%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))))
(if (<= y -2.5e+181)
(* 60.0 (/ (- x y) (- z t)))
(if (<= y 1.12e+143) (+ (* a 120.0) (* x t_1)) (* (- x y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double tmp;
if (y <= -2.5e+181) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 1.12e+143) {
tmp = (a * 120.0) + (x * t_1);
} else {
tmp = (x - y) * 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 - t)
if (y <= (-2.5d+181)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (y <= 1.12d+143) then
tmp = (a * 120.0d0) + (x * t_1)
else
tmp = (x - y) * 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 - t);
double tmp;
if (y <= -2.5e+181) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (y <= 1.12e+143) {
tmp = (a * 120.0) + (x * t_1);
} else {
tmp = (x - y) * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) tmp = 0 if y <= -2.5e+181: tmp = 60.0 * ((x - y) / (z - t)) elif y <= 1.12e+143: tmp = (a * 120.0) + (x * t_1) else: tmp = (x - y) * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) tmp = 0.0 if (y <= -2.5e+181) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (y <= 1.12e+143) tmp = Float64(Float64(a * 120.0) + Float64(x * t_1)); else tmp = Float64(Float64(x - y) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); tmp = 0.0; if (y <= -2.5e+181) tmp = 60.0 * ((x - y) / (z - t)); elseif (y <= 1.12e+143) tmp = (a * 120.0) + (x * t_1); else tmp = (x - y) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+181], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+143], N[(N[(a * 120.0), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+181}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+143}:\\
\;\;\;\;a \cdot 120 + x \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot t\_1\\
\end{array}
\end{array}
if y < -2.5000000000000002e181Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 76.2%
if -2.5000000000000002e181 < y < 1.12e143Initial program 99.8%
*-commutative99.8%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 89.6%
associate-*r/89.6%
*-commutative89.6%
associate-*r/89.6%
Simplified89.6%
if 1.12e143 < y Initial program 99.5%
*-commutative99.5%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 81.9%
associate-*r/81.8%
Simplified81.8%
*-commutative99.5%
associate-/l*99.9%
Applied egg-rr82.1%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e-82) (not (<= a 5.2e+45))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e-82) || !(a <= 5.2e+45)) {
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 ((a <= (-1.4d-82)) .or. (.not. (a <= 5.2d+45))) 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 ((a <= -1.4e-82) || !(a <= 5.2e+45)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.4e-82) or not (a <= 5.2e+45): 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 ((a <= -1.4e-82) || !(a <= 5.2e+45)) 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 ((a <= -1.4e-82) || ~((a <= 5.2e+45))) 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[a, -1.4e-82], N[Not[LessEqual[a, 5.2e+45]], $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}\;a \leq -1.4 \cdot 10^{-82} \lor \neg \left(a \leq 5.2 \cdot 10^{+45}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.40000000000000012e-82 or 5.20000000000000014e45 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.4%
if -1.40000000000000012e-82 < a < 5.20000000000000014e45Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.1%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+181) (not (<= y 1.2e+144))) (* 60.0 (/ y (- t z))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+181) || !(y <= 1.2e+144)) {
tmp = 60.0 * (y / (t - 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 <= (-3.2d+181)) .or. (.not. (y <= 1.2d+144))) then
tmp = 60.0d0 * (y / (t - 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 <= -3.2e+181) || !(y <= 1.2e+144)) {
tmp = 60.0 * (y / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+181) or not (y <= 1.2e+144): tmp = 60.0 * (y / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+181) || !(y <= 1.2e+144)) tmp = Float64(60.0 * Float64(y / Float64(t - 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 <= -3.2e+181) || ~((y <= 1.2e+144))) tmp = 60.0 * (y / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+181], N[Not[LessEqual[y, 1.2e+144]], $MachinePrecision]], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+181} \lor \neg \left(y \leq 1.2 \cdot 10^{+144}\right):\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.2e181 or 1.2e144 < y Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.5%
Taylor expanded in x around 0 71.5%
neg-mul-171.5%
distribute-neg-frac271.5%
neg-sub071.5%
sub-neg71.5%
+-commutative71.5%
associate--r+71.5%
neg-sub071.5%
remove-double-neg71.5%
Simplified71.5%
if -3.2e181 < y < 1.2e144Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.8%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.2e+181) (* 60.0 (/ y (- t z))) (if (<= y 3.9e+143) (* a 120.0) (* y (/ 60.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+181) {
tmp = 60.0 * (y / (t - z));
} else if (y <= 3.9e+143) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / (t - 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 (y <= (-5.2d+181)) then
tmp = 60.0d0 * (y / (t - z))
else if (y <= 3.9d+143) then
tmp = a * 120.0d0
else
tmp = y * (60.0d0 / (t - z))
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.2e+181) {
tmp = 60.0 * (y / (t - z));
} else if (y <= 3.9e+143) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+181: tmp = 60.0 * (y / (t - z)) elif y <= 3.9e+143: tmp = a * 120.0 else: tmp = y * (60.0 / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+181) tmp = Float64(60.0 * Float64(y / Float64(t - z))); elseif (y <= 3.9e+143) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+181) tmp = 60.0 * (y / (t - z)); elseif (y <= 3.9e+143) tmp = a * 120.0; else tmp = y * (60.0 / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+181], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+143], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+181}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+143}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if y < -5.2e181Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 76.2%
Taylor expanded in x around 0 74.6%
neg-mul-174.6%
distribute-neg-frac274.6%
neg-sub074.6%
sub-neg74.6%
+-commutative74.6%
associate--r+74.6%
neg-sub074.6%
remove-double-neg74.6%
Simplified74.6%
if -5.2e181 < y < 3.8999999999999998e143Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.8%
if 3.8999999999999998e143 < y Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.9%
Taylor expanded in x around 0 69.2%
associate-*r/87.0%
*-commutative87.0%
*-lft-identity87.0%
times-frac87.2%
/-rgt-identity87.2%
metadata-eval87.2%
distribute-neg-frac87.2%
distribute-neg-frac287.2%
neg-sub087.2%
sub-neg87.2%
+-commutative87.2%
associate--r+87.2%
neg-sub087.2%
remove-double-neg87.2%
Simplified69.4%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 7.2e+144) (* a 120.0) (if (<= y 3.8e+159) (* y (/ 60.0 t)) (* y (/ -60.0 z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 7.2e+144) {
tmp = a * 120.0;
} else if (y <= 3.8e+159) {
tmp = y * (60.0 / t);
} else {
tmp = y * (-60.0 / 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 (y <= 7.2d+144) then
tmp = a * 120.0d0
else if (y <= 3.8d+159) then
tmp = y * (60.0d0 / t)
else
tmp = y * ((-60.0d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 7.2e+144) {
tmp = a * 120.0;
} else if (y <= 3.8e+159) {
tmp = y * (60.0 / t);
} else {
tmp = y * (-60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 7.2e+144: tmp = a * 120.0 elif y <= 3.8e+159: tmp = y * (60.0 / t) else: tmp = y * (-60.0 / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 7.2e+144) tmp = Float64(a * 120.0); elseif (y <= 3.8e+159) tmp = Float64(y * Float64(60.0 / t)); else tmp = Float64(y * Float64(-60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 7.2e+144) tmp = a * 120.0; elseif (y <= 3.8e+159) tmp = y * (60.0 / t); else tmp = y * (-60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 7.2e+144], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 3.8e+159], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.2 \cdot 10^{+144}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+159}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\end{array}
\end{array}
if y < 7.1999999999999995e144Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if 7.1999999999999995e144 < y < 3.79999999999999965e159Initial program 99.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
Taylor expanded in x around 0 86.2%
associate-*r/86.0%
*-commutative86.0%
*-lft-identity86.0%
times-frac86.7%
/-rgt-identity86.7%
metadata-eval86.7%
distribute-neg-frac86.7%
distribute-neg-frac286.7%
neg-sub086.7%
sub-neg86.7%
+-commutative86.7%
associate--r+86.7%
neg-sub086.7%
remove-double-neg86.7%
Simplified86.7%
Taylor expanded in t around inf 85.8%
if 3.79999999999999965e159 < y Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around 0 65.4%
associate-*r/87.2%
*-commutative87.2%
*-lft-identity87.2%
times-frac87.3%
/-rgt-identity87.3%
metadata-eval87.3%
distribute-neg-frac87.3%
distribute-neg-frac287.3%
neg-sub087.3%
sub-neg87.3%
+-commutative87.3%
associate--r+87.3%
neg-sub087.3%
remove-double-neg87.3%
Simplified65.5%
Taylor expanded in t around 0 46.6%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (<= y 8.2e+145) (* a 120.0) (if (<= y 1.1e+160) (* 60.0 (/ y t)) (* y (/ -60.0 z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 8.2e+145) {
tmp = a * 120.0;
} else if (y <= 1.1e+160) {
tmp = 60.0 * (y / t);
} else {
tmp = y * (-60.0 / 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 (y <= 8.2d+145) then
tmp = a * 120.0d0
else if (y <= 1.1d+160) then
tmp = 60.0d0 * (y / t)
else
tmp = y * ((-60.0d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 8.2e+145) {
tmp = a * 120.0;
} else if (y <= 1.1e+160) {
tmp = 60.0 * (y / t);
} else {
tmp = y * (-60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 8.2e+145: tmp = a * 120.0 elif y <= 1.1e+160: tmp = 60.0 * (y / t) else: tmp = y * (-60.0 / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 8.2e+145) tmp = Float64(a * 120.0); elseif (y <= 1.1e+160) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(y * Float64(-60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 8.2e+145) tmp = a * 120.0; elseif (y <= 1.1e+160) tmp = 60.0 * (y / t); else tmp = y * (-60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 8.2e+145], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 1.1e+160], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.2 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+160}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\end{array}
\end{array}
if y < 8.2000000000000003e145Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if 8.2000000000000003e145 < y < 1.09999999999999996e160Initial program 99.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 99.6%
Taylor expanded in x around 0 86.2%
neg-mul-186.2%
distribute-neg-frac286.2%
neg-sub086.2%
sub-neg86.2%
+-commutative86.2%
associate--r+86.2%
neg-sub086.2%
remove-double-neg86.2%
Simplified86.2%
Taylor expanded in t around inf 85.4%
if 1.09999999999999996e160 < y Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around 0 65.4%
associate-*r/87.2%
*-commutative87.2%
*-lft-identity87.2%
times-frac87.3%
/-rgt-identity87.3%
metadata-eval87.3%
distribute-neg-frac87.3%
distribute-neg-frac287.3%
neg-sub087.3%
sub-neg87.3%
+-commutative87.3%
associate--r+87.3%
neg-sub087.3%
remove-double-neg87.3%
Simplified65.5%
Taylor expanded in t around 0 46.6%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
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) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 4.5e+145) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4.5e+145) {
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 (y <= 4.5d+145) 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 (y <= 4.5e+145) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 4.5e+145: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 4.5e+145) 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 (y <= 4.5e+145) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 4.5e+145], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < 4.4999999999999998e145Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if 4.4999999999999998e145 < y Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.9%
Taylor expanded in x around 0 69.2%
neg-mul-169.2%
distribute-neg-frac269.2%
neg-sub069.2%
sub-neg69.2%
+-commutative69.2%
associate--r+69.2%
neg-sub069.2%
remove-double-neg69.2%
Simplified69.2%
Taylor expanded in t around inf 43.2%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.4e+145) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.4e+145) {
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 (y <= 2.4d+145) 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 (y <= 2.4e+145) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.4e+145: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.4e+145) 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 (y <= 2.4e+145) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.4e+145], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{+145}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 2.39999999999999992e145Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if 2.39999999999999992e145 < y Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.9%
Taylor expanded in x around 0 69.2%
neg-mul-169.2%
distribute-neg-frac269.2%
neg-sub069.2%
sub-neg69.2%
+-commutative69.2%
associate--r+69.2%
neg-sub069.2%
remove-double-neg69.2%
Simplified69.2%
Taylor expanded in t around 0 41.1%
Final simplification56.5%
(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 53.4%
Final simplification53.4%
(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 2024114
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))