?

Average Error: 29.1 → 11.1
Time: 2.2min
Precision: binary64
Cost: 3400

?

\[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
\[\begin{array}{l} t_1 := y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i\\ t_2 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -2.4 \cdot 10^{+55}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+53}:\\ \;\;\;\;\frac{t}{t_1} + \frac{\left(230661.510616 + y \cdot \left(27464.7644705 + \left(y \cdot x + z\right) \cdot y\right)\right) \cdot y}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y (+ c (* y (+ (* (+ y a) y) b)))) i))
        (t_2 (+ (/ (- z (* a x)) y) x)))
   (if (<= y -2.4e+55)
     t_2
     (if (<= y 2.8e+53)
       (+
        (/ t t_1)
        (/
         (* (+ 230661.510616 (* y (+ 27464.7644705 (* (+ (* y x) z) y)))) y)
         t_1))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (c + (y * (((y + a) * y) + b)))) + i;
	double t_2 = ((z - (a * x)) / y) + x;
	double tmp;
	if (y <= -2.4e+55) {
		tmp = t_2;
	} else if (y <= 2.8e+53) {
		tmp = (t / t_1) + (((230661.510616 + (y * (27464.7644705 + (((y * x) + z) * y)))) * y) / t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
real(8) function code(x, y, z, t, a, b, c, i)
    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), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (y * (c + (y * (((y + a) * y) + b)))) + i
    t_2 = ((z - (a * x)) / y) + x
    if (y <= (-2.4d+55)) then
        tmp = t_2
    else if (y <= 2.8d+53) then
        tmp = (t / t_1) + (((230661.510616d0 + (y * (27464.7644705d0 + (((y * x) + z) * y)))) * y) / 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 a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * (c + (y * (((y + a) * y) + b)))) + i;
	double t_2 = ((z - (a * x)) / y) + x;
	double tmp;
	if (y <= -2.4e+55) {
		tmp = t_2;
	} else if (y <= 2.8e+53) {
		tmp = (t / t_1) + (((230661.510616 + (y * (27464.7644705 + (((y * x) + z) * y)))) * y) / t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * (c + (y * (((y + a) * y) + b)))) + i
	t_2 = ((z - (a * x)) / y) + x
	tmp = 0
	if y <= -2.4e+55:
		tmp = t_2
	elif y <= 2.8e+53:
		tmp = (t / t_1) + (((230661.510616 + (y * (27464.7644705 + (((y * x) + z) * y)))) * y) / t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * Float64(c + Float64(y * Float64(Float64(Float64(y + a) * y) + b)))) + i)
	t_2 = Float64(Float64(Float64(z - Float64(a * x)) / y) + x)
	tmp = 0.0
	if (y <= -2.4e+55)
		tmp = t_2;
	elseif (y <= 2.8e+53)
		tmp = Float64(Float64(t / t_1) + Float64(Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(Float64(Float64(y * x) + z) * y)))) * y) / t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * (c + (y * (((y + a) * y) + b)))) + i;
	t_2 = ((z - (a * x)) / y) + x;
	tmp = 0.0;
	if (y <= -2.4e+55)
		tmp = t_2;
	elseif (y <= 2.8e+53)
		tmp = (t / t_1) + (((230661.510616 + (y * (27464.7644705 + (((y * x) + z) * y)))) * y) / t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(c + N[(y * N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -2.4e+55], t$95$2, If[LessEqual[y, 2.8e+53], N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(N[(N[(y * x), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\begin{array}{l}
t_1 := y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i\\
t_2 := \frac{z - a \cdot x}{y} + x\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+55}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{t}{t_1} + \frac{\left(230661.510616 + y \cdot \left(27464.7644705 + \left(y \cdot x + z\right) \cdot y\right)\right) \cdot y}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if y < -2.3999999999999999e55 or 2.8e53 < y

    1. Initial program 62.3

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in y around -inf 19.7

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y} + x} \]
    3. Simplified19.7

      \[\leadsto \color{blue}{\frac{z - a \cdot x}{y} + x} \]
      Proof

    if -2.3999999999999999e55 < y < 2.8e53

    1. Initial program 4.7

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Taylor expanded in t around inf 4.7

      \[\leadsto \color{blue}{\frac{t}{y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i} + \frac{\left(230661.510616 + y \cdot \left(27464.7644705 + \left(y \cdot x + z\right) \cdot y\right)\right) \cdot y}{y \cdot \left(c + y \cdot \left(\left(y + a\right) \cdot y + b\right)\right) + i}} \]
  3. Recombined 2 regimes into one program.

Alternatives

Alternative 1
Error11.0
Cost2376
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+53}:\\ \;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Error13.7
Cost2120
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -2.55 \cdot 10^{+54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 7 \cdot 10^{+71}:\\ \;\;\;\;\frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error16.5
Cost1996
\[\begin{array}{l} t_1 := \left(y + a\right) \cdot y + b\\ t_2 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -1.25 \cdot 10^{+54}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -5.1 \cdot 10^{-30}:\\ \;\;\;\;\frac{y \cdot \left(230661.510616 + y \cdot \left(y \cdot z + 27464.7644705\right)\right)}{y \cdot \left(c + y \cdot t_1\right) + i}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\ \;\;\;\;\frac{\left(y \cdot 27464.7644705 + 230661.510616\right) \cdot y + t}{\left(t_1 \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 4
Error16.3
Cost1864
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -1.7 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{\left(y \cdot 27464.7644705 + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 5
Error16.8
Cost1608
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -5.6 \cdot 10^{+38}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y \cdot 230661.510616 + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error18.0
Cost1480
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -2.8 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{-80}:\\ \;\;\;\;\frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{c \cdot y + i}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y \cdot 230661.510616 + t}{\left(y \cdot b + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error27.3
Cost1228
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-97}:\\ \;\;\;\;\frac{t + 230661.510616 \cdot y}{i}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y \cdot \left(230661.510616 + y \cdot 27464.7644705\right) + t}{c \cdot y}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error18.0
Cost1224
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{y \cdot 230661.510616 + t}{\left(y \cdot b + c\right) \cdot y + i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.3
Cost1104
\[\begin{array}{l} t_1 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -4 \cdot 10^{+42}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-98}:\\ \;\;\;\;\frac{t + 230661.510616 \cdot y}{i}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+19}:\\ \;\;\;\;\frac{230661.510616}{c} + \frac{t}{c \cdot y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error27.3
Cost1104
\[\begin{array}{l} t_1 := t + 230661.510616 \cdot y\\ t_2 := \frac{z - a \cdot x}{y} + x\\ \mathbf{if}\;y \leq -1.35 \cdot 10^{+42}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{-97}:\\ \;\;\;\;\frac{t_1}{i}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+19}:\\ \;\;\;\;\frac{t_1}{c \cdot y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error30.3
Cost972
\[\begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+15}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-98}:\\ \;\;\;\;\frac{t + 230661.510616 \cdot y}{i}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+19}:\\ \;\;\;\;\frac{230661.510616}{c} + \frac{t}{c \cdot y}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Error29.9
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -22500000000000:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{-44}:\\ \;\;\;\;\frac{t + 230661.510616 \cdot y}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 13
Error32.0
Cost456
\[\begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+71}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error46.6
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023033 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
  :precision binary64
  (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))