
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* (- t x) (- y z))))
double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t - x) * (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
def code(x, y, z, t): return x + ((t - x) * (y - z))
function code(x, y, z, t) return Float64(x + Float64(Float64(t - x) * Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x + ((t - x) * (y - z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right) \cdot \left(y - z\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* x z))) (t_2 (* y (- t x))) (t_3 (* z (- t))))
(if (<= y -1.55e-30)
t_2
(if (<= y -1.08e-250)
t_3
(if (<= y 1.6e-239)
t_1
(if (<= y 9.1e-187) t_3 (if (<= y 5.6e+36) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (x * z);
double t_2 = y * (t - x);
double t_3 = z * -t;
double tmp;
if (y <= -1.55e-30) {
tmp = t_2;
} else if (y <= -1.08e-250) {
tmp = t_3;
} else if (y <= 1.6e-239) {
tmp = t_1;
} else if (y <= 9.1e-187) {
tmp = t_3;
} else if (y <= 5.6e+36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + (x * z)
t_2 = y * (t - x)
t_3 = z * -t
if (y <= (-1.55d-30)) then
tmp = t_2
else if (y <= (-1.08d-250)) then
tmp = t_3
else if (y <= 1.6d-239) then
tmp = t_1
else if (y <= 9.1d-187) then
tmp = t_3
else if (y <= 5.6d+36) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (x * z);
double t_2 = y * (t - x);
double t_3 = z * -t;
double tmp;
if (y <= -1.55e-30) {
tmp = t_2;
} else if (y <= -1.08e-250) {
tmp = t_3;
} else if (y <= 1.6e-239) {
tmp = t_1;
} else if (y <= 9.1e-187) {
tmp = t_3;
} else if (y <= 5.6e+36) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (x * z) t_2 = y * (t - x) t_3 = z * -t tmp = 0 if y <= -1.55e-30: tmp = t_2 elif y <= -1.08e-250: tmp = t_3 elif y <= 1.6e-239: tmp = t_1 elif y <= 9.1e-187: tmp = t_3 elif y <= 5.6e+36: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(x * z)) t_2 = Float64(y * Float64(t - x)) t_3 = Float64(z * Float64(-t)) tmp = 0.0 if (y <= -1.55e-30) tmp = t_2; elseif (y <= -1.08e-250) tmp = t_3; elseif (y <= 1.6e-239) tmp = t_1; elseif (y <= 9.1e-187) tmp = t_3; elseif (y <= 5.6e+36) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (x * z); t_2 = y * (t - x); t_3 = z * -t; tmp = 0.0; if (y <= -1.55e-30) tmp = t_2; elseif (y <= -1.08e-250) tmp = t_3; elseif (y <= 1.6e-239) tmp = t_1; elseif (y <= 9.1e-187) tmp = t_3; elseif (y <= 5.6e+36) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[y, -1.55e-30], t$95$2, If[LessEqual[y, -1.08e-250], t$95$3, If[LessEqual[y, 1.6e-239], t$95$1, If[LessEqual[y, 9.1e-187], t$95$3, If[LessEqual[y, 5.6e+36], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot z\\
t_2 := y \cdot \left(t - x\right)\\
t_3 := z \cdot \left(-t\right)\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{-250}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-239}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.1 \cdot 10^{-187}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (+ x (* t (- y z)))))
(if (<= y -3.1e+23)
t_1
(if (<= y 3.7e-186)
t_2
(if (<= y 4.2e-170) (+ x (* x z)) (if (<= y 1.35e+57) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x + (t * (y - z));
double tmp;
if (y <= -3.1e+23) {
tmp = t_1;
} else if (y <= 3.7e-186) {
tmp = t_2;
} else if (y <= 4.2e-170) {
tmp = x + (x * z);
} else if (y <= 1.35e+57) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t - x)
t_2 = x + (t * (y - z))
if (y <= (-3.1d+23)) then
tmp = t_1
else if (y <= 3.7d-186) then
tmp = t_2
else if (y <= 4.2d-170) then
tmp = x + (x * z)
else if (y <= 1.35d+57) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x + (t * (y - z));
double tmp;
if (y <= -3.1e+23) {
tmp = t_1;
} else if (y <= 3.7e-186) {
tmp = t_2;
} else if (y <= 4.2e-170) {
tmp = x + (x * z);
} else if (y <= 1.35e+57) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x + (t * (y - z)) tmp = 0 if y <= -3.1e+23: tmp = t_1 elif y <= 3.7e-186: tmp = t_2 elif y <= 4.2e-170: tmp = x + (x * z) elif y <= 1.35e+57: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(x + Float64(t * Float64(y - z))) tmp = 0.0 if (y <= -3.1e+23) tmp = t_1; elseif (y <= 3.7e-186) tmp = t_2; elseif (y <= 4.2e-170) tmp = Float64(x + Float64(x * z)); elseif (y <= 1.35e+57) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = x + (t * (y - z)); tmp = 0.0; if (y <= -3.1e+23) tmp = t_1; elseif (y <= 3.7e-186) tmp = t_2; elseif (y <= 4.2e-170) tmp = x + (x * z); elseif (y <= 1.35e+57) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+23], t$95$1, If[LessEqual[y, 3.7e-186], t$95$2, If[LessEqual[y, 4.2e-170], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+57], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x + t \cdot \left(y - z\right)\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-186}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-170}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* x (- 1.0 y))))
(if (<= z -2.2e+17)
t_1
(if (<= z 9.2e-147)
t_2
(if (<= z 3.4e-88) (* y t) (if (<= z 500.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -2.2e+17) {
tmp = t_1;
} else if (z <= 9.2e-147) {
tmp = t_2;
} else if (z <= 3.4e-88) {
tmp = y * t;
} else if (z <= 500.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * -t
t_2 = x * (1.0d0 - y)
if (z <= (-2.2d+17)) then
tmp = t_1
else if (z <= 9.2d-147) then
tmp = t_2
else if (z <= 3.4d-88) then
tmp = y * t
else if (z <= 500.0d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = x * (1.0 - y);
double tmp;
if (z <= -2.2e+17) {
tmp = t_1;
} else if (z <= 9.2e-147) {
tmp = t_2;
} else if (z <= 3.4e-88) {
tmp = y * t;
} else if (z <= 500.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = x * (1.0 - y) tmp = 0 if z <= -2.2e+17: tmp = t_1 elif z <= 9.2e-147: tmp = t_2 elif z <= 3.4e-88: tmp = y * t elif z <= 500.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -2.2e+17) tmp = t_1; elseif (z <= 9.2e-147) tmp = t_2; elseif (z <= 3.4e-88) tmp = Float64(y * t); elseif (z <= 500.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = x * (1.0 - y); tmp = 0.0; if (z <= -2.2e+17) tmp = t_1; elseif (z <= 9.2e-147) tmp = t_2; elseif (z <= 3.4e-88) tmp = y * t; elseif (z <= 500.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+17], t$95$1, If[LessEqual[z, 9.2e-147], t$95$2, If[LessEqual[z, 3.4e-88], N[(y * t), $MachinePrecision], If[LessEqual[z, 500.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-147}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-88}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 500:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* z (- t))))
(if (<= y -3.8e-30)
t_1
(if (<= y 1.15e-160)
t_2
(if (<= y 1.9e-29) (+ x (* y t)) (if (<= y 3.6e+36) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = z * -t;
double tmp;
if (y <= -3.8e-30) {
tmp = t_1;
} else if (y <= 1.15e-160) {
tmp = t_2;
} else if (y <= 1.9e-29) {
tmp = x + (y * t);
} else if (y <= 3.6e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t - x)
t_2 = z * -t
if (y <= (-3.8d-30)) then
tmp = t_1
else if (y <= 1.15d-160) then
tmp = t_2
else if (y <= 1.9d-29) then
tmp = x + (y * t)
else if (y <= 3.6d+36) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = z * -t;
double tmp;
if (y <= -3.8e-30) {
tmp = t_1;
} else if (y <= 1.15e-160) {
tmp = t_2;
} else if (y <= 1.9e-29) {
tmp = x + (y * t);
} else if (y <= 3.6e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = z * -t tmp = 0 if y <= -3.8e-30: tmp = t_1 elif y <= 1.15e-160: tmp = t_2 elif y <= 1.9e-29: tmp = x + (y * t) elif y <= 3.6e+36: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(z * Float64(-t)) tmp = 0.0 if (y <= -3.8e-30) tmp = t_1; elseif (y <= 1.15e-160) tmp = t_2; elseif (y <= 1.9e-29) tmp = Float64(x + Float64(y * t)); elseif (y <= 3.6e+36) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = z * -t; tmp = 0.0; if (y <= -3.8e-30) tmp = t_1; elseif (y <= 1.15e-160) tmp = t_2; elseif (y <= 1.9e-29) tmp = x + (y * t); elseif (y <= 3.6e+36) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[y, -3.8e-30], t$95$1, If[LessEqual[y, 1.15e-160], t$95$2, If[LessEqual[y, 1.9e-29], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+36], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := z \cdot \left(-t\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))))
(if (<= y -3.4e+161)
t_1
(if (<= y -3.9e+70)
(* y t)
(if (<= y 7e+36) (* z (- t)) (if (<= y 4.4e+150) t_1 (* y t)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (y <= -3.4e+161) {
tmp = t_1;
} else if (y <= -3.9e+70) {
tmp = y * t;
} else if (y <= 7e+36) {
tmp = z * -t;
} else if (y <= 4.4e+150) {
tmp = t_1;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * -x
if (y <= (-3.4d+161)) then
tmp = t_1
else if (y <= (-3.9d+70)) then
tmp = y * t
else if (y <= 7d+36) then
tmp = z * -t
else if (y <= 4.4d+150) then
tmp = t_1
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (y <= -3.4e+161) {
tmp = t_1;
} else if (y <= -3.9e+70) {
tmp = y * t;
} else if (y <= 7e+36) {
tmp = z * -t;
} else if (y <= 4.4e+150) {
tmp = t_1;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if y <= -3.4e+161: tmp = t_1 elif y <= -3.9e+70: tmp = y * t elif y <= 7e+36: tmp = z * -t elif y <= 4.4e+150: tmp = t_1 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (y <= -3.4e+161) tmp = t_1; elseif (y <= -3.9e+70) tmp = Float64(y * t); elseif (y <= 7e+36) tmp = Float64(z * Float64(-t)); elseif (y <= 4.4e+150) tmp = t_1; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (y <= -3.4e+161) tmp = t_1; elseif (y <= -3.9e+70) tmp = y * t; elseif (y <= 7e+36) tmp = z * -t; elseif (y <= 4.4e+150) tmp = t_1; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -3.4e+161], t$95$1, If[LessEqual[y, -3.9e+70], N[(y * t), $MachinePrecision], If[LessEqual[y, 7e+36], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 4.4e+150], t$95$1, N[(y * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{+70}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+36}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))))
(if (<= y -2.6e+17)
t_1
(if (<= y 3.3e-186)
(- x (* z t))
(if (<= y 3.6e+36) (+ x (* x z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2.6e+17) {
tmp = t_1;
} else if (y <= 3.3e-186) {
tmp = x - (z * t);
} else if (y <= 3.6e+36) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-2.6d+17)) then
tmp = t_1
else if (y <= 3.3d-186) then
tmp = x - (z * t)
else if (y <= 3.6d+36) then
tmp = x + (x * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -2.6e+17) {
tmp = t_1;
} else if (y <= 3.3e-186) {
tmp = x - (z * t);
} else if (y <= 3.6e+36) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -2.6e+17: tmp = t_1 elif y <= 3.3e-186: tmp = x - (z * t) elif y <= 3.6e+36: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -2.6e+17) tmp = t_1; elseif (y <= 3.3e-186) tmp = Float64(x - Float64(z * t)); elseif (y <= 3.6e+36) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -2.6e+17) tmp = t_1; elseif (y <= 3.3e-186) tmp = x - (z * t); elseif (y <= 3.6e+36) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+17], t$95$1, If[LessEqual[y, 3.3e-186], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+36], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-186}:\\
\;\;\;\;x - z \cdot t\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+36}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.9e-75) (not (<= t 1.65e+31))) (+ x (* t (- y z))) (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.9e-75) || !(t <= 1.65e+31)) {
tmp = x + (t * (y - z));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-3.9d-75)) .or. (.not. (t <= 1.65d+31))) then
tmp = x + (t * (y - z))
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.9e-75) || !(t <= 1.65e+31)) {
tmp = x + (t * (y - z));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.9e-75) or not (t <= 1.65e+31): tmp = x + (t * (y - z)) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.9e-75) || !(t <= 1.65e+31)) tmp = Float64(x + Float64(t * Float64(y - z))); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.9e-75) || ~((t <= 1.65e+31))) tmp = x + (t * (y - z)); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.9e-75], N[Not[LessEqual[t, 1.65e+31]], $MachinePrecision]], N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-75} \lor \neg \left(t \leq 1.65 \cdot 10^{+31}\right):\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* y (- t x)))) (if (<= y -4.4e+73) t_1 (if (<= y 2.6e+37) (- x (* z (- t x))) (+ x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -4.4e+73) {
tmp = t_1;
} else if (y <= 2.6e+37) {
tmp = x - (z * (t - x));
} else {
tmp = x + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t - x)
if (y <= (-4.4d+73)) then
tmp = t_1
else if (y <= 2.6d+37) then
tmp = x - (z * (t - x))
else
tmp = x + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double tmp;
if (y <= -4.4e+73) {
tmp = t_1;
} else if (y <= 2.6e+37) {
tmp = x - (z * (t - x));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) tmp = 0 if y <= -4.4e+73: tmp = t_1 elif y <= 2.6e+37: tmp = x - (z * (t - x)) else: tmp = x + t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) tmp = 0.0 if (y <= -4.4e+73) tmp = t_1; elseif (y <= 2.6e+37) tmp = Float64(x - Float64(z * Float64(t - x))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); tmp = 0.0; if (y <= -4.4e+73) tmp = t_1; elseif (y <= 2.6e+37) tmp = x - (z * (t - x)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+73], t$95$1, If[LessEqual[y, 2.6e+37], N[(x - N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+37}:\\
\;\;\;\;x - z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.8e-31) (not (<= y 4.2e+36))) (* y (- t x)) (* z (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.8e-31) || !(y <= 4.2e+36)) {
tmp = y * (t - x);
} else {
tmp = z * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.8d-31)) .or. (.not. (y <= 4.2d+36))) then
tmp = y * (t - x)
else
tmp = z * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.8e-31) || !(y <= 4.2e+36)) {
tmp = y * (t - x);
} else {
tmp = z * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.8e-31) or not (y <= 4.2e+36): tmp = y * (t - x) else: tmp = z * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.8e-31) || !(y <= 4.2e+36)) tmp = Float64(y * Float64(t - x)); else tmp = Float64(z * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.8e-31) || ~((y <= 4.2e+36))) tmp = y * (t - x); else tmp = z * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.8e-31], N[Not[LessEqual[y, 4.2e+36]], $MachinePrecision]], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], N[(z * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-31} \lor \neg \left(y \leq 4.2 \cdot 10^{+36}\right):\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.52e-64) (not (<= t 6.6e+125))) (* y t) (* y (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.52e-64) || !(t <= 6.6e+125)) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.52d-64)) .or. (.not. (t <= 6.6d+125))) then
tmp = y * t
else
tmp = y * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.52e-64) || !(t <= 6.6e+125)) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.52e-64) or not (t <= 6.6e+125): tmp = y * t else: tmp = y * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.52e-64) || !(t <= 6.6e+125)) tmp = Float64(y * t); else tmp = Float64(y * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.52e-64) || ~((t <= 6.6e+125))) tmp = y * t; else tmp = y * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.52e-64], N[Not[LessEqual[t, 6.6e+125]], $MachinePrecision]], N[(y * t), $MachinePrecision], N[(y * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{-64} \lor \neg \left(t \leq 6.6 \cdot 10^{+125}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -8.6e-33) (not (<= y 7.2e-64))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8.6e-33) || !(y <= 7.2e-64)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-8.6d-33)) .or. (.not. (y <= 7.2d-64))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8.6e-33) || !(y <= 7.2e-64)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8.6e-33) or not (y <= 7.2e-64): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8.6e-33) || !(y <= 7.2e-64)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8.6e-33) || ~((y <= 7.2e-64))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8.6e-33], N[Not[LessEqual[y, 7.2e-64]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-33} \lor \neg \left(y \leq 7.2 \cdot 10^{-64}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t * (y - z)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024003
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))