
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z) * t) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- y z) (- a z)) t)))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - 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 = x + (((y - z) / (a - z)) * t)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) / (a - z)) * t);
}
def code(x, y, z, t, a): return x + (((y - z) / (a - z)) * t)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) / (a - z)) * t); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{a - z} \cdot t
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ t z) (- z y)))))
(if (<= z -8.5e-34)
t_1
(if (<= z -4.6e-67)
(+ x (* t (/ y a)))
(if (or (<= z -2e-105) (not (<= z 9.5e-27)))
t_1
(+ x (* y (/ t a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t / z) * (z - y));
double tmp;
if (z <= -8.5e-34) {
tmp = t_1;
} else if (z <= -4.6e-67) {
tmp = x + (t * (y / a));
} else if ((z <= -2e-105) || !(z <= 9.5e-27)) {
tmp = t_1;
} else {
tmp = x + (y * (t / a));
}
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 = x + ((t / z) * (z - y))
if (z <= (-8.5d-34)) then
tmp = t_1
else if (z <= (-4.6d-67)) then
tmp = x + (t * (y / a))
else if ((z <= (-2d-105)) .or. (.not. (z <= 9.5d-27))) then
tmp = t_1
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t / z) * (z - y));
double tmp;
if (z <= -8.5e-34) {
tmp = t_1;
} else if (z <= -4.6e-67) {
tmp = x + (t * (y / a));
} else if ((z <= -2e-105) || !(z <= 9.5e-27)) {
tmp = t_1;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t / z) * (z - y)) tmp = 0 if z <= -8.5e-34: tmp = t_1 elif z <= -4.6e-67: tmp = x + (t * (y / a)) elif (z <= -2e-105) or not (z <= 9.5e-27): tmp = t_1 else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t / z) * Float64(z - y))) tmp = 0.0 if (z <= -8.5e-34) tmp = t_1; elseif (z <= -4.6e-67) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= -2e-105) || !(z <= 9.5e-27)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t / z) * (z - y)); tmp = 0.0; if (z <= -8.5e-34) tmp = t_1; elseif (z <= -4.6e-67) tmp = x + (t * (y / a)); elseif ((z <= -2e-105) || ~((z <= 9.5e-27))) tmp = t_1; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e-34], t$95$1, If[LessEqual[z, -4.6e-67], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2e-105], N[Not[LessEqual[z, 9.5e-27]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-67}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-105} \lor \neg \left(z \leq 9.5 \cdot 10^{-27}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ t z) (- z y)))))
(if (<= z -2.55e-33)
t_1
(if (<= z -3.2e-67)
(+ x (* t (/ y a)))
(if (or (<= z -1.9e-105) (not (<= z 7e-27)))
t_1
(+ x (/ t (/ a (- y z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t / z) * (z - y));
double tmp;
if (z <= -2.55e-33) {
tmp = t_1;
} else if (z <= -3.2e-67) {
tmp = x + (t * (y / a));
} else if ((z <= -1.9e-105) || !(z <= 7e-27)) {
tmp = t_1;
} else {
tmp = x + (t / (a / (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) :: t_1
real(8) :: tmp
t_1 = x + ((t / z) * (z - y))
if (z <= (-2.55d-33)) then
tmp = t_1
else if (z <= (-3.2d-67)) then
tmp = x + (t * (y / a))
else if ((z <= (-1.9d-105)) .or. (.not. (z <= 7d-27))) then
tmp = t_1
else
tmp = x + (t / (a / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t / z) * (z - y));
double tmp;
if (z <= -2.55e-33) {
tmp = t_1;
} else if (z <= -3.2e-67) {
tmp = x + (t * (y / a));
} else if ((z <= -1.9e-105) || !(z <= 7e-27)) {
tmp = t_1;
} else {
tmp = x + (t / (a / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t / z) * (z - y)) tmp = 0 if z <= -2.55e-33: tmp = t_1 elif z <= -3.2e-67: tmp = x + (t * (y / a)) elif (z <= -1.9e-105) or not (z <= 7e-27): tmp = t_1 else: tmp = x + (t / (a / (y - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t / z) * Float64(z - y))) tmp = 0.0 if (z <= -2.55e-33) tmp = t_1; elseif (z <= -3.2e-67) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= -1.9e-105) || !(z <= 7e-27)) tmp = t_1; else tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t / z) * (z - y)); tmp = 0.0; if (z <= -2.55e-33) tmp = t_1; elseif (z <= -3.2e-67) tmp = x + (t * (y / a)); elseif ((z <= -1.9e-105) || ~((z <= 7e-27))) tmp = t_1; else tmp = x + (t / (a / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e-33], t$95$1, If[LessEqual[z, -3.2e-67], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.9e-105], N[Not[LessEqual[z, 7e-27]], $MachinePrecision]], t$95$1, N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-67}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-105} \lor \neg \left(z \leq 7 \cdot 10^{-27}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.05e-38) (not (<= a 2.15e+34))) (+ x (* t (/ (- y z) a))) (+ x (* (/ t z) (- z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.05e-38) || !(a <= 2.15e+34)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = x + ((t / z) * (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4.05d-38)) .or. (.not. (a <= 2.15d+34))) then
tmp = x + (t * ((y - z) / a))
else
tmp = x + ((t / z) * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.05e-38) || !(a <= 2.15e+34)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = x + ((t / z) * (z - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.05e-38) or not (a <= 2.15e+34): tmp = x + (t * ((y - z) / a)) else: tmp = x + ((t / z) * (z - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.05e-38) || !(a <= 2.15e+34)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.05e-38) || ~((a <= 2.15e+34))) tmp = x + (t * ((y - z) / a)); else tmp = x + ((t / z) * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.05e-38], N[Not[LessEqual[a, 2.15e+34]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.05 \cdot 10^{-38} \lor \neg \left(a \leq 2.15 \cdot 10^{+34}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \left(z - y\right)\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e-15) (not (<= z 4.5e-6))) (+ x (* (/ t z) (- z y))) (+ x (/ t (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e-15) || !(z <= 4.5e-6)) {
tmp = x + ((t / z) * (z - y));
} else {
tmp = x + (t / ((a - z) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.8d-15)) .or. (.not. (z <= 4.5d-6))) then
tmp = x + ((t / z) * (z - y))
else
tmp = x + (t / ((a - z) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e-15) || !(z <= 4.5e-6)) {
tmp = x + ((t / z) * (z - y));
} else {
tmp = x + (t / ((a - z) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e-15) or not (z <= 4.5e-6): tmp = x + ((t / z) * (z - y)) else: tmp = x + (t / ((a - z) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e-15) || !(z <= 4.5e-6)) tmp = Float64(x + Float64(Float64(t / z) * Float64(z - y))); else tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.8e-15) || ~((z <= 4.5e-6))) tmp = x + ((t / z) * (z - y)); else tmp = x + (t / ((a - z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e-15], N[Not[LessEqual[z, 4.5e-6]], $MachinePrecision]], N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-15} \lor \neg \left(z \leq 4.5 \cdot 10^{-6}\right):\\
\;\;\;\;x + \frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e-16) (not (<= z 4e-12))) (+ x (* (/ t z) (- z y))) (+ x (/ (* y t) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e-16) || !(z <= 4e-12)) {
tmp = x + ((t / z) * (z - y));
} else {
tmp = x + ((y * t) / (a - 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 ((z <= (-1d-16)) .or. (.not. (z <= 4d-12))) then
tmp = x + ((t / z) * (z - y))
else
tmp = x + ((y * t) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e-16) || !(z <= 4e-12)) {
tmp = x + ((t / z) * (z - y));
} else {
tmp = x + ((y * t) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1e-16) or not (z <= 4e-12): tmp = x + ((t / z) * (z - y)) else: tmp = x + ((y * t) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1e-16) || !(z <= 4e-12)) tmp = Float64(x + Float64(Float64(t / z) * Float64(z - y))); else tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1e-16) || ~((z <= 4e-12))) tmp = x + ((t / z) * (z - y)); else tmp = x + ((y * t) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e-16], N[Not[LessEqual[z, 4e-12]], $MachinePrecision]], N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-16} \lor \neg \left(z \leq 4 \cdot 10^{-12}\right):\\
\;\;\;\;x + \frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z -6.6e-16) (- x (* z (/ t (- a z)))) (if (<= z 1.5e-14) (+ x (/ (* y t) (- a z))) (+ x (* (/ t z) (- z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e-16) {
tmp = x - (z * (t / (a - z)));
} else if (z <= 1.5e-14) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x + ((t / z) * (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.6d-16)) then
tmp = x - (z * (t / (a - z)))
else if (z <= 1.5d-14) then
tmp = x + ((y * t) / (a - z))
else
tmp = x + ((t / z) * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e-16) {
tmp = x - (z * (t / (a - z)));
} else if (z <= 1.5e-14) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x + ((t / z) * (z - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e-16: tmp = x - (z * (t / (a - z))) elif z <= 1.5e-14: tmp = x + ((y * t) / (a - z)) else: tmp = x + ((t / z) * (z - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e-16) tmp = Float64(x - Float64(z * Float64(t / Float64(a - z)))); elseif (z <= 1.5e-14) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e-16) tmp = x - (z * (t / (a - z))); elseif (z <= 1.5e-14) tmp = x + ((y * t) / (a - z)); else tmp = x + ((t / z) * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e-16], N[(x - N[(z * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-14], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-16}:\\
\;\;\;\;x - z \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \left(z - y\right)\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z -1.9e-16) (- x (* z (/ t (- a z)))) (if (<= z 0.18) (+ x (/ (* y t) (- a z))) (- x (/ t (/ z (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e-16) {
tmp = x - (z * (t / (a - z)));
} else if (z <= 0.18) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x - (t / (z / (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 (z <= (-1.9d-16)) then
tmp = x - (z * (t / (a - z)))
else if (z <= 0.18d0) then
tmp = x + ((y * t) / (a - z))
else
tmp = x - (t / (z / (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 (z <= -1.9e-16) {
tmp = x - (z * (t / (a - z)));
} else if (z <= 0.18) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x - (t / (z / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e-16: tmp = x - (z * (t / (a - z))) elif z <= 0.18: tmp = x + ((y * t) / (a - z)) else: tmp = x - (t / (z / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e-16) tmp = Float64(x - Float64(z * Float64(t / Float64(a - z)))); elseif (z <= 0.18) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = Float64(x - Float64(t / Float64(z / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e-16) tmp = x - (z * (t / (a - z))); elseif (z <= 0.18) tmp = x + ((y * t) / (a - z)); else tmp = x - (t / (z / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e-16], N[(x - N[(z * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.18], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-16}:\\
\;\;\;\;x - z \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 0.18:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y - z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= z -1.7e-16) (+ x (* t (/ -1.0 (+ -1.0 (/ a z))))) (if (<= z 0.03) (+ x (/ (* y t) (- a z))) (- x (/ t (/ z (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e-16) {
tmp = x + (t * (-1.0 / (-1.0 + (a / z))));
} else if (z <= 0.03) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x - (t / (z / (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 (z <= (-1.7d-16)) then
tmp = x + (t * ((-1.0d0) / ((-1.0d0) + (a / z))))
else if (z <= 0.03d0) then
tmp = x + ((y * t) / (a - z))
else
tmp = x - (t / (z / (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 (z <= -1.7e-16) {
tmp = x + (t * (-1.0 / (-1.0 + (a / z))));
} else if (z <= 0.03) {
tmp = x + ((y * t) / (a - z));
} else {
tmp = x - (t / (z / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e-16: tmp = x + (t * (-1.0 / (-1.0 + (a / z)))) elif z <= 0.03: tmp = x + ((y * t) / (a - z)) else: tmp = x - (t / (z / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e-16) tmp = Float64(x + Float64(t * Float64(-1.0 / Float64(-1.0 + Float64(a / z))))); elseif (z <= 0.03) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); else tmp = Float64(x - Float64(t / Float64(z / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e-16) tmp = x + (t * (-1.0 / (-1.0 + (a / z)))); elseif (z <= 0.03) tmp = x + ((y * t) / (a - z)); else tmp = x - (t / (z / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e-16], N[(x + N[(t * N[(-1.0 / N[(-1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.03], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;x + t \cdot \frac{-1}{-1 + \frac{a}{z}}\\
\mathbf{elif}\;z \leq 0.03:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y - z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.08e-33) (not (<= z 1.65e-26))) (+ x t) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.08e-33) || !(z <= 1.65e-26)) {
tmp = x + t;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.08d-33)) .or. (.not. (z <= 1.65d-26))) then
tmp = x + t
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.08e-33) || !(z <= 1.65e-26)) {
tmp = x + t;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.08e-33) or not (z <= 1.65e-26): tmp = x + t else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.08e-33) || !(z <= 1.65e-26)) tmp = Float64(x + t); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.08e-33) || ~((z <= 1.65e-26))) tmp = x + t; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.08e-33], N[Not[LessEqual[z, 1.65e-26]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{-33} \lor \neg \left(z \leq 1.65 \cdot 10^{-26}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a 1.95e+30) (+ x t) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1.95e+30) {
tmp = x + t;
} else {
tmp = x;
}
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.95d+30) then
tmp = x + t
else
tmp = x
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.95e+30) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 1.95e+30: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 1.95e+30) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 1.95e+30) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1.95e+30], N[(x + t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.95 \cdot 10^{+30}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} 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 = x + (((y - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
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 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2024008
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))