data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/general/sim_math.vh
 line:23: before: "function"
1: b"%Error: data/full_repos/permissive/214858095/FPGA_Exploration/spartan6/B205mini/ISE_Project/sim/general/sim_math.vh:122: Can't find definition of task/function: 'fabs'\n    x1 = fabs(x)*1.44269504;\n         ^~~~\n%Error: Exiting due to 1 error(s)\n"
function real atan;
  input x;
  real x;
  real x1,x2,sign,bias;
  real d3,s3;
  begin
    sign = 1.0;
    bias = 0.0;
    x1 = x;
    if (x1 < 0.0)
      begin
        x1 = -x1;
        sign = -1.0;
      end
    if (x1 > 1.0)
      begin
        x1 = 1.0/x1;
        bias = sign*3.14159265/2.0;
        sign = -1.0*sign;
      end
    x2 = x1*x1;
    d3 = x2 + 1.44863154;
    d3 = 0.26476862 / d3;
    s3 = x2 + 3.3163354;
    d3 = s3 - d3;
    d3 = 7.10676 / d3;
    s3 = 6.762139 + x2;
    d3 = s3 - d3;
    d3 = 3.7092563 / d3;
    d3 = d3 + 0.17465544;
    atan = sign*x1*d3+bias;
  end
endfunction
function real atan;

  input x;
  real x;
  real x1,x2,sign,bias;
  real d3,s3;
  begin
    sign = 1.0;
    bias = 0.0;
    x1 = x;
    if (x1 < 0.0)
      begin
        x1 = -x1;
        sign = -1.0;
      end
    if (x1 > 1.0)
      begin
        x1 = 1.0/x1;
        bias = sign*3.14159265/2.0;
        sign = -1.0*sign;
      end
    x2 = x1*x1;
    d3 = x2 + 1.44863154;
    d3 = 0.26476862 / d3;
    s3 = x2 + 3.3163354;
    d3 = s3 - d3;
    d3 = 7.10676 / d3;
    s3 = 6.762139 + x2;
    d3 = s3 - d3;
    d3 = 3.7092563 / d3;
    d3 = d3 + 0.17465544;
    atan = sign*x1*d3+bias;
  end
endfunction