Statistics.Sample:$skurtosis from math-functions-0.1.5.2

Percentage Accurate: 94.1% → 99.7%
Time: 4.1s
Alternatives: 5
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x}{y \cdot y} - 3 \end{array} \]
(FPCore (x y) :precision binary64 (- (/ x (* y y)) 3.0))
double code(double x, double y) {
	return (x / (y * y)) - 3.0;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x / (y * y)) - 3.0d0
end function
public static double code(double x, double y) {
	return (x / (y * y)) - 3.0;
}
def code(x, y):
	return (x / (y * y)) - 3.0
function code(x, y)
	return Float64(Float64(x / Float64(y * y)) - 3.0)
end
function tmp = code(x, y)
	tmp = (x / (y * y)) - 3.0;
end
code[x_, y_] := N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{y \cdot y} - 3
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 5 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 94.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x}{y \cdot y} - 3 \end{array} \]
(FPCore (x y) :precision binary64 (- (/ x (* y y)) 3.0))
double code(double x, double y) {
	return (x / (y * y)) - 3.0;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x / (y * y)) - 3.0d0
end function
public static double code(double x, double y) {
	return (x / (y * y)) - 3.0;
}
def code(x, y):
	return (x / (y * y)) - 3.0
function code(x, y)
	return Float64(Float64(x / Float64(y * y)) - 3.0)
end
function tmp = code(x, y)
	tmp = (x / (y * y)) - 3.0;
end
code[x_, y_] := N[(N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{y \cdot y} - 3
\end{array}

Alternative 1: 99.7% accurate, 0.7× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} \mathbf{if}\;y\_m \leq 5.2 \cdot 10^{-160}:\\ \;\;\;\;\frac{\frac{x}{y\_m}}{y\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y\_m \cdot y\_m} - 3\\ \end{array} \end{array} \]
y_m = (fabs.f64 y)
(FPCore (x y_m)
 :precision binary64
 (if (<= y_m 5.2e-160) (/ (/ x y_m) y_m) (- (/ x (* y_m y_m)) 3.0)))
y_m = fabs(y);
double code(double x, double y_m) {
	double tmp;
	if (y_m <= 5.2e-160) {
		tmp = (x / y_m) / y_m;
	} else {
		tmp = (x / (y_m * y_m)) - 3.0;
	}
	return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m)
    real(8), intent (in) :: x
    real(8), intent (in) :: y_m
    real(8) :: tmp
    if (y_m <= 5.2d-160) then
        tmp = (x / y_m) / y_m
    else
        tmp = (x / (y_m * y_m)) - 3.0d0
    end if
    code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m) {
	double tmp;
	if (y_m <= 5.2e-160) {
		tmp = (x / y_m) / y_m;
	} else {
		tmp = (x / (y_m * y_m)) - 3.0;
	}
	return tmp;
}
y_m = math.fabs(y)
def code(x, y_m):
	tmp = 0
	if y_m <= 5.2e-160:
		tmp = (x / y_m) / y_m
	else:
		tmp = (x / (y_m * y_m)) - 3.0
	return tmp
y_m = abs(y)
function code(x, y_m)
	tmp = 0.0
	if (y_m <= 5.2e-160)
		tmp = Float64(Float64(x / y_m) / y_m);
	else
		tmp = Float64(Float64(x / Float64(y_m * y_m)) - 3.0);
	end
	return tmp
end
y_m = abs(y);
function tmp_2 = code(x, y_m)
	tmp = 0.0;
	if (y_m <= 5.2e-160)
		tmp = (x / y_m) / y_m;
	else
		tmp = (x / (y_m * y_m)) - 3.0;
	end
	tmp_2 = tmp;
end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_] := If[LessEqual[y$95$m, 5.2e-160], N[(N[(x / y$95$m), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(x / N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|

\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;\frac{\frac{x}{y\_m}}{y\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y\_m \cdot y\_m} - 3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 5.20000000000000007e-160

    1. Initial program 94.8%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Applied rewrites32.5%

      \[\leadsto \color{blue}{\sqrt{\frac{x}{y}} \cdot \sqrt{\frac{\frac{x}{y}}{y \cdot y}}} - 3 \]
    4. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot {\left(\sqrt{-1}\right)}^{2}}{{y}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{{y}^{2}}} \]
      2. unpow2N/A

        \[\leadsto \frac{-1 \cdot \left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{\color{blue}{y \cdot y}} \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{-1 \cdot \left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{y}}{y}} \]
      4. mul-1-negN/A

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right)}}{y}}{y} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{{\left(\sqrt{-1}\right)}^{2} \cdot x}\right)}{y}}{y} \]
      6. unpow2N/A

        \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot x\right)}{y}}{y} \]
      7. rem-square-sqrtN/A

        \[\leadsto \frac{\frac{\mathsf{neg}\left(\color{blue}{-1} \cdot x\right)}{y}}{y} \]
      8. distribute-frac-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{-1 \cdot x}{y}\right)}}{y} \]
      9. distribute-frac-neg2N/A

        \[\leadsto \frac{\color{blue}{\frac{-1 \cdot x}{\mathsf{neg}\left(y\right)}}}{y} \]
      10. mul-1-negN/A

        \[\leadsto \frac{\frac{\color{blue}{\mathsf{neg}\left(x\right)}}{\mathsf{neg}\left(y\right)}}{y} \]
      11. distribute-frac-negN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\frac{x}{\mathsf{neg}\left(y\right)}\right)}}{y} \]
      12. distribute-neg-fracN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\frac{x}{\mathsf{neg}\left(y\right)}}{y}\right)} \]
      13. distribute-frac-neg2N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{\mathsf{neg}\left(y\right)}}{\mathsf{neg}\left(y\right)}} \]
      14. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{x}{\left(\mathsf{neg}\left(y\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right)}} \]
      15. sqr-neg-revN/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
      16. unpow2N/A

        \[\leadsto \frac{x}{\color{blue}{{y}^{2}}} \]
      17. unpow2N/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
      18. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
      19. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]
      20. lower-/.f6459.6

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{y} \]
    6. Applied rewrites59.6%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} \]

    if 5.20000000000000007e-160 < y

    1. Initial program 99.9%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 92.8% accurate, 0.3× speedup?

\[\begin{array}{l} y_m = \left|y\right| \\ \begin{array}{l} t_0 := \frac{x}{y\_m \cdot y\_m}\\ t_1 := t\_0 - 3\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14} \lor \neg \left(t\_1 \leq -2\right):\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;-3\\ \end{array} \end{array} \]
y_m = (fabs.f64 y)
(FPCore (x y_m)
 :precision binary64
 (let* ((t_0 (/ x (* y_m y_m))) (t_1 (- t_0 3.0)))
   (if (or (<= t_1 -1e+14) (not (<= t_1 -2.0))) t_0 -3.0)))
y_m = fabs(y);
double code(double x, double y_m) {
	double t_0 = x / (y_m * y_m);
	double t_1 = t_0 - 3.0;
	double tmp;
	if ((t_1 <= -1e+14) || !(t_1 <= -2.0)) {
		tmp = t_0;
	} else {
		tmp = -3.0;
	}
	return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m)
    real(8), intent (in) :: x
    real(8), intent (in) :: y_m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = x / (y_m * y_m)
    t_1 = t_0 - 3.0d0
    if ((t_1 <= (-1d+14)) .or. (.not. (t_1 <= (-2.0d0)))) then
        tmp = t_0
    else
        tmp = -3.0d0
    end if
    code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m) {
	double t_0 = x / (y_m * y_m);
	double t_1 = t_0 - 3.0;
	double tmp;
	if ((t_1 <= -1e+14) || !(t_1 <= -2.0)) {
		tmp = t_0;
	} else {
		tmp = -3.0;
	}
	return tmp;
}
y_m = math.fabs(y)
def code(x, y_m):
	t_0 = x / (y_m * y_m)
	t_1 = t_0 - 3.0
	tmp = 0
	if (t_1 <= -1e+14) or not (t_1 <= -2.0):
		tmp = t_0
	else:
		tmp = -3.0
	return tmp
y_m = abs(y)
function code(x, y_m)
	t_0 = Float64(x / Float64(y_m * y_m))
	t_1 = Float64(t_0 - 3.0)
	tmp = 0.0
	if ((t_1 <= -1e+14) || !(t_1 <= -2.0))
		tmp = t_0;
	else
		tmp = -3.0;
	end
	return tmp
end
y_m = abs(y);
function tmp_2 = code(x, y_m)
	t_0 = x / (y_m * y_m);
	t_1 = t_0 - 3.0;
	tmp = 0.0;
	if ((t_1 <= -1e+14) || ~((t_1 <= -2.0)))
		tmp = t_0;
	else
		tmp = -3.0;
	end
	tmp_2 = tmp;
end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_] := Block[{t$95$0 = N[(x / N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - 3.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+14], N[Not[LessEqual[t$95$1, -2.0]], $MachinePrecision]], t$95$0, -3.0]]]
\begin{array}{l}
y_m = \left|y\right|

\\
\begin{array}{l}
t_0 := \frac{x}{y\_m \cdot y\_m}\\
t_1 := t\_0 - 3\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14} \lor \neg \left(t\_1 \leq -2\right):\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;-3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (/.f64 x (*.f64 y y)) #s(literal 3 binary64)) < -1e14 or -2 < (-.f64 (/.f64 x (*.f64 y y)) #s(literal 3 binary64))

    1. Initial program 93.6%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} - 3 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} - 3 \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3 \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3 \]
      5. lower-/.f6499.8

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{y} - 3 \]
    4. Applied rewrites99.8%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y} - 3} \]
    5. Applied rewrites3.1%

      \[\leadsto \color{blue}{\frac{{\left(\frac{\sqrt{x}}{y}\right)}^{6} - 27}{{\left(\frac{\sqrt{x}}{y}\right)}^{8} - {\left(\mathsf{fma}\left(\frac{\frac{x}{y}}{y}, 3, 9\right)\right)}^{2}} \cdot \left({\left(\frac{\sqrt{x}}{y}\right)}^{4} - \mathsf{fma}\left(\frac{\frac{x}{y}}{y}, 3, 9\right)\right)} \]
    6. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot {\left(\sqrt{-1}\right)}^{2}}{{y}^{2}}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{x \cdot {\left(\sqrt{-1}\right)}^{2}}{{y}^{2}} \cdot -1} \]
      2. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot -1}{{y}^{2}}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot x\right)} \cdot -1}{{y}^{2}} \]
      4. unpow2N/A

        \[\leadsto \frac{\left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot x\right) \cdot -1}{{y}^{2}} \]
      5. rem-square-sqrtN/A

        \[\leadsto \frac{\left(\color{blue}{-1} \cdot x\right) \cdot -1}{{y}^{2}} \]
      6. mul-1-negN/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \cdot -1}{{y}^{2}} \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(x \cdot -1\right)}}{{y}^{2}} \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(\mathsf{neg}\left(-1\right)\right)}}{{y}^{2}} \]
      9. metadata-evalN/A

        \[\leadsto \frac{x \cdot \color{blue}{1}}{{y}^{2}} \]
      10. *-rgt-identityN/A

        \[\leadsto \frac{\color{blue}{x}}{{y}^{2}} \]
      11. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{{y}^{2}}} \]
      12. unpow2N/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
      13. lower-*.f6492.5

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} \]
    8. Applied rewrites92.5%

      \[\leadsto \color{blue}{\frac{x}{y \cdot y}} \]

    if -1e14 < (-.f64 (/.f64 x (*.f64 y y)) #s(literal 3 binary64)) < -2

    1. Initial program 100.0%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-3} \]
    4. Step-by-step derivation
      1. Applied rewrites99.8%

        \[\leadsto \color{blue}{-3} \]
    5. Recombined 2 regimes into one program.
    6. Final simplification96.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x}{y \cdot y} - 3 \leq -1 \cdot 10^{+14} \lor \neg \left(\frac{x}{y \cdot y} - 3 \leq -2\right):\\ \;\;\;\;\frac{x}{y \cdot y}\\ \mathbf{else}:\\ \;\;\;\;-3\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 99.9% accurate, 0.8× speedup?

    \[\begin{array}{l} y_m = \left|y\right| \\ \frac{\frac{x}{y\_m}}{y\_m} - 3 \end{array} \]
    y_m = (fabs.f64 y)
    (FPCore (x y_m) :precision binary64 (- (/ (/ x y_m) y_m) 3.0))
    y_m = fabs(y);
    double code(double x, double y_m) {
    	return ((x / y_m) / y_m) - 3.0;
    }
    
    y_m = abs(y)
    real(8) function code(x, y_m)
        real(8), intent (in) :: x
        real(8), intent (in) :: y_m
        code = ((x / y_m) / y_m) - 3.0d0
    end function
    
    y_m = Math.abs(y);
    public static double code(double x, double y_m) {
    	return ((x / y_m) / y_m) - 3.0;
    }
    
    y_m = math.fabs(y)
    def code(x, y_m):
    	return ((x / y_m) / y_m) - 3.0
    
    y_m = abs(y)
    function code(x, y_m)
    	return Float64(Float64(Float64(x / y_m) / y_m) - 3.0)
    end
    
    y_m = abs(y);
    function tmp = code(x, y_m)
    	tmp = ((x / y_m) / y_m) - 3.0;
    end
    
    y_m = N[Abs[y], $MachinePrecision]
    code[x_, y$95$m_] := N[(N[(N[(x / y$95$m), $MachinePrecision] / y$95$m), $MachinePrecision] - 3.0), $MachinePrecision]
    
    \begin{array}{l}
    y_m = \left|y\right|
    
    \\
    \frac{\frac{x}{y\_m}}{y\_m} - 3
    \end{array}
    
    Derivation
    1. Initial program 96.7%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{y \cdot y}} - 3 \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x}{\color{blue}{y \cdot y}} - 3 \]
      3. associate-/r*N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3 \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}} - 3 \]
      5. lower-/.f6499.9

        \[\leadsto \frac{\color{blue}{\frac{x}{y}}}{y} - 3 \]
    4. Applied rewrites99.9%

      \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y} - 3} \]
    5. Add Preprocessing

    Alternative 4: 94.1% accurate, 1.0× speedup?

    \[\begin{array}{l} y_m = \left|y\right| \\ \frac{x}{y\_m \cdot y\_m} - 3 \end{array} \]
    y_m = (fabs.f64 y)
    (FPCore (x y_m) :precision binary64 (- (/ x (* y_m y_m)) 3.0))
    y_m = fabs(y);
    double code(double x, double y_m) {
    	return (x / (y_m * y_m)) - 3.0;
    }
    
    y_m = abs(y)
    real(8) function code(x, y_m)
        real(8), intent (in) :: x
        real(8), intent (in) :: y_m
        code = (x / (y_m * y_m)) - 3.0d0
    end function
    
    y_m = Math.abs(y);
    public static double code(double x, double y_m) {
    	return (x / (y_m * y_m)) - 3.0;
    }
    
    y_m = math.fabs(y)
    def code(x, y_m):
    	return (x / (y_m * y_m)) - 3.0
    
    y_m = abs(y)
    function code(x, y_m)
    	return Float64(Float64(x / Float64(y_m * y_m)) - 3.0)
    end
    
    y_m = abs(y);
    function tmp = code(x, y_m)
    	tmp = (x / (y_m * y_m)) - 3.0;
    end
    
    y_m = N[Abs[y], $MachinePrecision]
    code[x_, y$95$m_] := N[(N[(x / N[(y$95$m * y$95$m), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]
    
    \begin{array}{l}
    y_m = \left|y\right|
    
    \\
    \frac{x}{y\_m \cdot y\_m} - 3
    \end{array}
    
    Derivation
    1. Initial program 96.7%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Add Preprocessing

    Alternative 5: 51.1% accurate, 20.0× speedup?

    \[\begin{array}{l} y_m = \left|y\right| \\ -3 \end{array} \]
    y_m = (fabs.f64 y)
    (FPCore (x y_m) :precision binary64 -3.0)
    y_m = fabs(y);
    double code(double x, double y_m) {
    	return -3.0;
    }
    
    y_m = abs(y)
    real(8) function code(x, y_m)
        real(8), intent (in) :: x
        real(8), intent (in) :: y_m
        code = -3.0d0
    end function
    
    y_m = Math.abs(y);
    public static double code(double x, double y_m) {
    	return -3.0;
    }
    
    y_m = math.fabs(y)
    def code(x, y_m):
    	return -3.0
    
    y_m = abs(y)
    function code(x, y_m)
    	return -3.0
    end
    
    y_m = abs(y);
    function tmp = code(x, y_m)
    	tmp = -3.0;
    end
    
    y_m = N[Abs[y], $MachinePrecision]
    code[x_, y$95$m_] := -3.0
    
    \begin{array}{l}
    y_m = \left|y\right|
    
    \\
    -3
    \end{array}
    
    Derivation
    1. Initial program 96.7%

      \[\frac{x}{y \cdot y} - 3 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{-3} \]
    4. Step-by-step derivation
      1. Applied rewrites50.0%

        \[\leadsto \color{blue}{-3} \]
      2. Add Preprocessing

      Developer Target 1: 99.9% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \frac{\frac{x}{y}}{y} - 3 \end{array} \]
      (FPCore (x y) :precision binary64 (- (/ (/ x y) y) 3.0))
      double code(double x, double y) {
      	return ((x / y) / y) - 3.0;
      }
      
      real(8) function code(x, y)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          code = ((x / y) / y) - 3.0d0
      end function
      
      public static double code(double x, double y) {
      	return ((x / y) / y) - 3.0;
      }
      
      def code(x, y):
      	return ((x / y) / y) - 3.0
      
      function code(x, y)
      	return Float64(Float64(Float64(x / y) / y) - 3.0)
      end
      
      function tmp = code(x, y)
      	tmp = ((x / y) / y) - 3.0;
      end
      
      code[x_, y_] := N[(N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision] - 3.0), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \frac{\frac{x}{y}}{y} - 3
      \end{array}
      

      Reproduce

      ?
      herbie shell --seed 2024342 
      (FPCore (x y)
        :name "Statistics.Sample:$skurtosis from math-functions-0.1.5.2"
        :precision binary64
      
        :alt
        (! :herbie-platform default (- (/ (/ x y) y) 3))
      
        (- (/ x (* y y)) 3.0))