Data.Colour.CIE:cieLAB from colour-2.3.3, A

Percentage Accurate: 99.7% → 99.7%
Time: 3.6s
Alternatives: 7
Speedup: 2.1×

Specification

?
\[\begin{array}{l} \\ \left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \end{array} \]
(FPCore (x y) :precision binary64 (* (* (- x (/ 16.0 116.0)) 3.0) y))
double code(double x, double y) {
	return ((x - (16.0 / 116.0)) * 3.0) * y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

\\
\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y
\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 7 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: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \end{array} \]
(FPCore (x y) :precision binary64 (* (* (- x (/ 16.0 116.0)) 3.0) y))
double code(double x, double y) {
	return ((x - (16.0 / 116.0)) * 3.0) * y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

\\
\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y
\end{array}

Alternative 1: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \end{array} \]
(FPCore (x y) :precision binary64 (* (* (- x (/ 16.0 116.0)) 3.0) y))
double code(double x, double y) {
	return ((x - (16.0 / 116.0)) * 3.0) * y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

\\
\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 97.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\ \;\;\;\;\left(y \cdot 3\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;-0.41379310344827586 \cdot y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= x -0.135) (not (<= x 0.135)))
   (* (* y 3.0) x)
   (* -0.41379310344827586 y)))
double code(double x, double y) {
	double tmp;
	if ((x <= -0.135) || !(x <= 0.135)) {
		tmp = (y * 3.0) * x;
	} else {
		tmp = -0.41379310344827586 * y;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((x <= (-0.135d0)) .or. (.not. (x <= 0.135d0))) then
        tmp = (y * 3.0d0) * x
    else
        tmp = (-0.41379310344827586d0) * y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((x <= -0.135) || !(x <= 0.135)) {
		tmp = (y * 3.0) * x;
	} else {
		tmp = -0.41379310344827586 * y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (x <= -0.135) or not (x <= 0.135):
		tmp = (y * 3.0) * x
	else:
		tmp = -0.41379310344827586 * y
	return tmp
function code(x, y)
	tmp = 0.0
	if ((x <= -0.135) || !(x <= 0.135))
		tmp = Float64(Float64(y * 3.0) * x);
	else
		tmp = Float64(-0.41379310344827586 * y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((x <= -0.135) || ~((x <= 0.135)))
		tmp = (y * 3.0) * x;
	else
		tmp = -0.41379310344827586 * y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[x, -0.135], N[Not[LessEqual[x, 0.135]], $MachinePrecision]], N[(N[(y * 3.0), $MachinePrecision] * x), $MachinePrecision], N[(-0.41379310344827586 * y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\
\;\;\;\;\left(y \cdot 3\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;-0.41379310344827586 \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -0.13500000000000001 or 0.13500000000000001 < x

    1. Initial program 99.7%

      \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
    4. Step-by-step derivation
      1. Applied rewrites97.9%

        \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \color{blue}{y \cdot \left(x \cdot 3\right)} \]
        3. lift-*.f64N/A

          \[\leadsto y \cdot \color{blue}{\left(x \cdot 3\right)} \]
        4. *-commutativeN/A

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

          \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]
        6. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(y \cdot 3\right)} \cdot x \]
        7. lower-*.f6497.8

          \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]
      3. Applied rewrites97.8%

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]

      if -0.13500000000000001 < x < 0.13500000000000001

      1. Initial program 99.9%

        \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
      2. Add Preprocessing
      3. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{-12}{29}} \cdot y \]
      4. Step-by-step derivation
        1. Applied rewrites96.6%

          \[\leadsto \color{blue}{-0.41379310344827586} \cdot y \]
      5. Recombined 2 regimes into one program.
      6. Final simplification97.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\ \;\;\;\;\left(y \cdot 3\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;-0.41379310344827586 \cdot y\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 97.8% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\ \;\;\;\;\left(y \cdot x\right) \cdot 3\\ \mathbf{else}:\\ \;\;\;\;-0.41379310344827586 \cdot y\\ \end{array} \end{array} \]
      (FPCore (x y)
       :precision binary64
       (if (or (<= x -0.135) (not (<= x 0.135)))
         (* (* y x) 3.0)
         (* -0.41379310344827586 y)))
      double code(double x, double y) {
      	double tmp;
      	if ((x <= -0.135) || !(x <= 0.135)) {
      		tmp = (y * x) * 3.0;
      	} else {
      		tmp = -0.41379310344827586 * y;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8) :: tmp
          if ((x <= (-0.135d0)) .or. (.not. (x <= 0.135d0))) then
              tmp = (y * x) * 3.0d0
          else
              tmp = (-0.41379310344827586d0) * y
          end if
          code = tmp
      end function
      
      public static double code(double x, double y) {
      	double tmp;
      	if ((x <= -0.135) || !(x <= 0.135)) {
      		tmp = (y * x) * 3.0;
      	} else {
      		tmp = -0.41379310344827586 * y;
      	}
      	return tmp;
      }
      
      def code(x, y):
      	tmp = 0
      	if (x <= -0.135) or not (x <= 0.135):
      		tmp = (y * x) * 3.0
      	else:
      		tmp = -0.41379310344827586 * y
      	return tmp
      
      function code(x, y)
      	tmp = 0.0
      	if ((x <= -0.135) || !(x <= 0.135))
      		tmp = Float64(Float64(y * x) * 3.0);
      	else
      		tmp = Float64(-0.41379310344827586 * y);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y)
      	tmp = 0.0;
      	if ((x <= -0.135) || ~((x <= 0.135)))
      		tmp = (y * x) * 3.0;
      	else
      		tmp = -0.41379310344827586 * y;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_] := If[Or[LessEqual[x, -0.135], N[Not[LessEqual[x, 0.135]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] * 3.0), $MachinePrecision], N[(-0.41379310344827586 * y), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\
      \;\;\;\;\left(y \cdot x\right) \cdot 3\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.41379310344827586 \cdot y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -0.13500000000000001 or 0.13500000000000001 < x

        1. Initial program 99.7%

          \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
        2. Add Preprocessing
        3. Taylor expanded in x around inf

          \[\leadsto \color{blue}{3 \cdot \left(x \cdot y\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{3} \]
          2. lower-*.f64N/A

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

            \[\leadsto \left(y \cdot x\right) \cdot 3 \]
          4. lower-*.f6497.7

            \[\leadsto \left(y \cdot x\right) \cdot 3 \]
        5. Applied rewrites97.7%

          \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot 3} \]

        if -0.13500000000000001 < x < 0.13500000000000001

        1. Initial program 99.9%

          \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
        2. Add Preprocessing
        3. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\frac{-12}{29}} \cdot y \]
        4. Step-by-step derivation
          1. Applied rewrites96.6%

            \[\leadsto \color{blue}{-0.41379310344827586} \cdot y \]
        5. Recombined 2 regimes into one program.
        6. Final simplification97.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.135 \lor \neg \left(x \leq 0.135\right):\\ \;\;\;\;\left(y \cdot x\right) \cdot 3\\ \mathbf{else}:\\ \;\;\;\;-0.41379310344827586 \cdot y\\ \end{array} \]
        7. Add Preprocessing

        Alternative 4: 97.8% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.135:\\ \;\;\;\;\left(y \cdot 3\right) \cdot x\\ \mathbf{elif}\;x \leq 0.135:\\ \;\;\;\;-0.41379310344827586 \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot 3\right) \cdot y\\ \end{array} \end{array} \]
        (FPCore (x y)
         :precision binary64
         (if (<= x -0.135)
           (* (* y 3.0) x)
           (if (<= x 0.135) (* -0.41379310344827586 y) (* (* x 3.0) y))))
        double code(double x, double y) {
        	double tmp;
        	if (x <= -0.135) {
        		tmp = (y * 3.0) * x;
        	} else if (x <= 0.135) {
        		tmp = -0.41379310344827586 * y;
        	} else {
        		tmp = (x * 3.0) * y;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8) :: tmp
            if (x <= (-0.135d0)) then
                tmp = (y * 3.0d0) * x
            else if (x <= 0.135d0) then
                tmp = (-0.41379310344827586d0) * y
            else
                tmp = (x * 3.0d0) * y
            end if
            code = tmp
        end function
        
        public static double code(double x, double y) {
        	double tmp;
        	if (x <= -0.135) {
        		tmp = (y * 3.0) * x;
        	} else if (x <= 0.135) {
        		tmp = -0.41379310344827586 * y;
        	} else {
        		tmp = (x * 3.0) * y;
        	}
        	return tmp;
        }
        
        def code(x, y):
        	tmp = 0
        	if x <= -0.135:
        		tmp = (y * 3.0) * x
        	elif x <= 0.135:
        		tmp = -0.41379310344827586 * y
        	else:
        		tmp = (x * 3.0) * y
        	return tmp
        
        function code(x, y)
        	tmp = 0.0
        	if (x <= -0.135)
        		tmp = Float64(Float64(y * 3.0) * x);
        	elseif (x <= 0.135)
        		tmp = Float64(-0.41379310344827586 * y);
        	else
        		tmp = Float64(Float64(x * 3.0) * y);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y)
        	tmp = 0.0;
        	if (x <= -0.135)
        		tmp = (y * 3.0) * x;
        	elseif (x <= 0.135)
        		tmp = -0.41379310344827586 * y;
        	else
        		tmp = (x * 3.0) * y;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_] := If[LessEqual[x, -0.135], N[(N[(y * 3.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 0.135], N[(-0.41379310344827586 * y), $MachinePrecision], N[(N[(x * 3.0), $MachinePrecision] * y), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -0.135:\\
        \;\;\;\;\left(y \cdot 3\right) \cdot x\\
        
        \mathbf{elif}\;x \leq 0.135:\\
        \;\;\;\;-0.41379310344827586 \cdot y\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(x \cdot 3\right) \cdot y\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -0.13500000000000001

          1. Initial program 99.7%

            \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
          2. Add Preprocessing
          3. Taylor expanded in x around inf

            \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
          4. Step-by-step derivation
            1. Applied rewrites97.3%

              \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

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

                \[\leadsto \color{blue}{y \cdot \left(x \cdot 3\right)} \]
              3. lift-*.f64N/A

                \[\leadsto y \cdot \color{blue}{\left(x \cdot 3\right)} \]
              4. *-commutativeN/A

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

                \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]
              6. lift-*.f64N/A

                \[\leadsto \color{blue}{\left(y \cdot 3\right)} \cdot x \]
              7. lower-*.f6497.4

                \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]
            3. Applied rewrites97.4%

              \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot x} \]

            if -0.13500000000000001 < x < 0.13500000000000001

            1. Initial program 99.9%

              \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
            2. Add Preprocessing
            3. Taylor expanded in x around 0

              \[\leadsto \color{blue}{\frac{-12}{29}} \cdot y \]
            4. Step-by-step derivation
              1. Applied rewrites96.6%

                \[\leadsto \color{blue}{-0.41379310344827586} \cdot y \]

              if 0.13500000000000001 < x

              1. Initial program 99.8%

                \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
              2. Add Preprocessing
              3. Taylor expanded in x around inf

                \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
              4. Step-by-step derivation
                1. Applied rewrites98.3%

                  \[\leadsto \left(\color{blue}{x} \cdot 3\right) \cdot y \]
              5. Recombined 3 regimes into one program.
              6. Add Preprocessing

              Alternative 5: 99.7% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \mathsf{fma}\left(\mathsf{fma}\left(0, x, 3 \cdot y\right), x, -0.41379310344827586 \cdot y\right) \end{array} \]
              (FPCore (x y)
               :precision binary64
               (fma (fma 0.0 x (* 3.0 y)) x (* -0.41379310344827586 y)))
              double code(double x, double y) {
              	return fma(fma(0.0, x, (3.0 * y)), x, (-0.41379310344827586 * y));
              }
              
              function code(x, y)
              	return fma(fma(0.0, x, Float64(3.0 * y)), x, Float64(-0.41379310344827586 * y))
              end
              
              code[x_, y_] := N[(N[(0.0 * x + N[(3.0 * y), $MachinePrecision]), $MachinePrecision] * x + N[(-0.41379310344827586 * y), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \mathsf{fma}\left(\mathsf{fma}\left(0, x, 3 \cdot y\right), x, -0.41379310344827586 \cdot y\right)
              \end{array}
              
              Derivation
              1. Initial program 99.8%

                \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y} \]
                2. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(x - \frac{16}{116}\right) \cdot 3\right)} \cdot y \]
                3. associate-*l*N/A

                  \[\leadsto \color{blue}{\left(x - \frac{16}{116}\right) \cdot \left(3 \cdot y\right)} \]
                4. lift--.f64N/A

                  \[\leadsto \color{blue}{\left(x - \frac{16}{116}\right)} \cdot \left(3 \cdot y\right) \]
                5. flip3--N/A

                  \[\leadsto \color{blue}{\frac{{x}^{3} - {\left(\frac{16}{116}\right)}^{3}}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)}} \cdot \left(3 \cdot y\right) \]
                6. associate-*l/N/A

                  \[\leadsto \color{blue}{\frac{\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot \left(3 \cdot y\right)}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)}} \]
                7. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot \left(3 \cdot y\right)}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)}} \]
                8. *-commutativeN/A

                  \[\leadsto \frac{\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot \color{blue}{\left(y \cdot 3\right)}}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                9. associate-*r*N/A

                  \[\leadsto \frac{\color{blue}{\left(\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot y\right) \cdot 3}}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                10. lower-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot y\right) \cdot 3}}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                11. lower-*.f64N/A

                  \[\leadsto \frac{\color{blue}{\left(\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot y\right)} \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                12. lower--.f64N/A

                  \[\leadsto \frac{\left(\color{blue}{\left({x}^{3} - {\left(\frac{16}{116}\right)}^{3}\right)} \cdot y\right) \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                13. lower-pow.f64N/A

                  \[\leadsto \frac{\left(\left(\color{blue}{{x}^{3}} - {\left(\frac{16}{116}\right)}^{3}\right) \cdot y\right) \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                14. lift-/.f64N/A

                  \[\leadsto \frac{\left(\left({x}^{3} - {\color{blue}{\left(\frac{16}{116}\right)}}^{3}\right) \cdot y\right) \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                15. metadata-evalN/A

                  \[\leadsto \frac{\left(\left({x}^{3} - {\color{blue}{\frac{4}{29}}}^{3}\right) \cdot y\right) \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                16. metadata-evalN/A

                  \[\leadsto \frac{\left(\left({x}^{3} - \color{blue}{\frac{64}{24389}}\right) \cdot y\right) \cdot 3}{x \cdot x + \left(\frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)} \]
                17. lower-fma.f64N/A

                  \[\leadsto \frac{\left(\left({x}^{3} - \frac{64}{24389}\right) \cdot y\right) \cdot 3}{\color{blue}{\mathsf{fma}\left(x, x, \frac{16}{116} \cdot \frac{16}{116} + x \cdot \frac{16}{116}\right)}} \]
              4. Applied rewrites68.3%

                \[\leadsto \color{blue}{\frac{\left(\left({x}^{3} - 0.002624133830825372\right) \cdot y\right) \cdot 3}{\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, 0.13793103448275862, 0.019024970273483946\right)\right)}} \]
              5. Taylor expanded in x around 0

                \[\leadsto \frac{\color{blue}{\frac{-192}{24389} \cdot y}}{\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, \frac{4}{29}, \frac{16}{841}\right)\right)} \]
              6. Step-by-step derivation
                1. lower-*.f6450.0

                  \[\leadsto \frac{-0.007872401492476117 \cdot \color{blue}{y}}{\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, 0.13793103448275862, 0.019024970273483946\right)\right)} \]
              7. Applied rewrites50.0%

                \[\leadsto \frac{\color{blue}{-0.007872401492476117 \cdot y}}{\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, 0.13793103448275862, 0.019024970273483946\right)\right)} \]
              8. Taylor expanded in x around 0

                \[\leadsto \frac{\frac{-192}{24389} \cdot y}{\color{blue}{\frac{16}{841}}} \]
              9. Step-by-step derivation
                1. Applied rewrites49.3%

                  \[\leadsto \frac{-0.007872401492476117 \cdot y}{\color{blue}{0.019024970273483946}} \]
                2. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{\frac{-12}{29} \cdot y + x \cdot \left(-3 \cdot \left(x \cdot \left(\frac{-29}{4} \cdot y + \frac{29}{4} \cdot y\right)\right) + 3 \cdot y\right)} \]
                3. Applied rewrites99.8%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(0, x, 3 \cdot y\right), x, -0.41379310344827586 \cdot y\right)} \]
                4. Add Preprocessing

                Alternative 6: 99.7% accurate, 2.1× speedup?

                \[\begin{array}{l} \\ \mathsf{fma}\left(3, x, -0.41379310344827586\right) \cdot y \end{array} \]
                (FPCore (x y) :precision binary64 (* (fma 3.0 x -0.41379310344827586) y))
                double code(double x, double y) {
                	return fma(3.0, x, -0.41379310344827586) * y;
                }
                
                function code(x, y)
                	return Float64(fma(3.0, x, -0.41379310344827586) * y)
                end
                
                code[x_, y_] := N[(N[(3.0 * x + -0.41379310344827586), $MachinePrecision] * y), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \mathsf{fma}\left(3, x, -0.41379310344827586\right) \cdot y
                \end{array}
                
                Derivation
                1. Initial program 99.8%

                  \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{\left(3 \cdot x - \frac{12}{29}\right)} \cdot y \]
                4. Applied rewrites99.8%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(3, x, -0.41379310344827586\right)} \cdot y \]
                5. Add Preprocessing

                Alternative 7: 50.7% accurate, 4.2× speedup?

                \[\begin{array}{l} \\ -0.41379310344827586 \cdot y \end{array} \]
                (FPCore (x y) :precision binary64 (* -0.41379310344827586 y))
                double code(double x, double y) {
                	return -0.41379310344827586 * y;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    code = (-0.41379310344827586d0) * y
                end function
                
                public static double code(double x, double y) {
                	return -0.41379310344827586 * y;
                }
                
                def code(x, y):
                	return -0.41379310344827586 * y
                
                function code(x, y)
                	return Float64(-0.41379310344827586 * y)
                end
                
                function tmp = code(x, y)
                	tmp = -0.41379310344827586 * y;
                end
                
                code[x_, y_] := N[(-0.41379310344827586 * y), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                -0.41379310344827586 \cdot y
                \end{array}
                
                Derivation
                1. Initial program 99.8%

                  \[\left(\left(x - \frac{16}{116}\right) \cdot 3\right) \cdot y \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{\frac{-12}{29}} \cdot y \]
                4. Step-by-step derivation
                  1. Applied rewrites49.8%

                    \[\leadsto \color{blue}{-0.41379310344827586} \cdot y \]
                  2. Add Preprocessing

                  Developer Target 1: 99.7% accurate, 1.8× speedup?

                  \[\begin{array}{l} \\ y \cdot \left(x \cdot 3 - 0.41379310344827586\right) \end{array} \]
                  (FPCore (x y) :precision binary64 (* y (- (* x 3.0) 0.41379310344827586)))
                  double code(double x, double y) {
                  	return y * ((x * 3.0) - 0.41379310344827586);
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      code = y * ((x * 3.0d0) - 0.41379310344827586d0)
                  end function
                  
                  public static double code(double x, double y) {
                  	return y * ((x * 3.0) - 0.41379310344827586);
                  }
                  
                  def code(x, y):
                  	return y * ((x * 3.0) - 0.41379310344827586)
                  
                  function code(x, y)
                  	return Float64(y * Float64(Float64(x * 3.0) - 0.41379310344827586))
                  end
                  
                  function tmp = code(x, y)
                  	tmp = y * ((x * 3.0) - 0.41379310344827586);
                  end
                  
                  code[x_, y_] := N[(y * N[(N[(x * 3.0), $MachinePrecision] - 0.41379310344827586), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  y \cdot \left(x \cdot 3 - 0.41379310344827586\right)
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2025026 
                  (FPCore (x y)
                    :name "Data.Colour.CIE:cieLAB from colour-2.3.3, A"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (* y (- (* x 3) 20689655172413793/50000000000000000)))
                  
                    (* (* (- x (/ 16.0 116.0)) 3.0) y))