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 sin;
  input x;
  real x;
  real x1,y,y2,y3,y5,y7,sum,sign;
  begin
    sign = 1.0;
    x1 = x;
    if (x1<0)
      begin
        x1 = -x1;
        sign = -1.0;
      end
    while (x1 > 3.14159265/2.0)
      begin
        x1 = x1 - 3.14159265;
        sign = -1.0*sign;
      end
    y = x1*2/3.14159265;
    y2 = y*y;
    y3 = y*y2;
    y5 = y3*y2;
    y7 = y5*y2;
    sum = 1.570794*y - 0.645962*y3 +
           0.079692*y5 - 0.004681712*y7;
    sin = sign*sum;
  end
endfunction
function real sin;

  input x;
  real x;
  real x1,y,y2,y3,y5,y7,sum,sign;
  begin
    sign = 1.0;
    x1 = x;
    if (x1<0)
      begin
        x1 = -x1;
        sign = -1.0;
      end
    while (x1 > 3.14159265/2.0)
      begin
        x1 = x1 - 3.14159265;
        sign = -1.0*sign;
      end
    y = x1*2/3.14159265;
    y2 = y*y;
    y3 = y*y2;
    y5 = y3*y2;
    y7 = y5*y2;
    sum = 1.570794*y - 0.645962*y3 +
           0.079692*y5 - 0.004681712*y7;
    sin = sign*sum;
  end
endfunction