@DATABASE DICE_Manual
@NODE MAIN "The DICE 3.xx Clib Documentation"
@INDEX DICE_Index/MAIN
@TOC dice.guide/MAIN

@prev  dice.guide/clib
@next  dice.guide/clib

    @{b}CLIB/Amiga Documentaion@{ub}

    Contents: @{i}Floating Points Maths Functions@{ui}

    @{" " link acos} acos - arc cosign double
    @{" " link acos} facos - arc cosign float
    @{" " link cos} cos - cosign double
    @{" " link cos} fcos - cosign float

    @{" " link asin} asin - arc sign double
    @{" " link asin} fasin - arc sign float
    @{" " link sin} sin - sign double
    @{" " link sin} fsin - sign float

    @{" " link atan} atan - arc tangent double
    @{" " link atan} fatan - arc tangent float
    @{" " link tan} tan - tangent double
    @{" " link tan} ftan - tangent float

    @{" " link log} log - logrithum double
    @{" " link log} flog - logrithum float
    @{" " link log10} log10  - base10 logrithum double
    @{" " link log10} flog10 - base10 logrithum float

    @{" " link exp} c.lib/float/exp
    @{" " link exp} c.lib/float/fexp

    @{" " link fabs} fabs - absolute double
    @{" " link fabs} ffabs - absolute float

    @{" " link pow} pow - power double
    @{" " link pow} fpow - power float

    @{" " link sqrt} sqrt - square root double
    @{" " link sqrt} fsqrt - square root float
            

@ENDNODE

@NODE acos "acos,facos commands"
@prev main
@next asin

 @{b}acos
 facos @{ub}

 NAME
  acos    - return arc cosine of a double quantity
  facos   - return arc cosine of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = acos(b);
  double b;

  float  c = facos(d);
  float  d;

 FUNCTION
  Returns the arc cosine of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = acos(0.25);
      printf("acos 0.25 = %lf\n", a);     /*  1.318   */
      }
      {                       /*  less accuracy   */
      float a = facos(0.25);
      printf("acos 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE asin "asin,fasin commands"
@prev acos
@next atan

 @{b}asin
 fasin @{ub}

 NAME
  asin    - return arc sine of a double quantity
  fasin   - return arc sine of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = asin(b);
  double b;

  float  c = fasin(d);
  float  d;

 FUNCTION
  Returns the arc sine of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = asin(0.25);
      printf("asin 0.25 = %lf\n", a);     /*  0.2527  */
      }
      {                       /*  less accuracy   */
      float a = fasin(0.25);
      printf("asin 0.25 = %lf\n", (double)a);
      }
      return(0);
  }


 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE atan "atan,fatan commands"
@prev asin
@next cos

 @{b}atan
 fatan @{ub}

 NAME
  atan    - return arc tan of a double quantity
  fatan   - return arc tan of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = atan(b);
  double b;

  float  c = fatan(d);
  float  d;

 FUNCTION
  Returns the arc tan of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = atan(0.25);
      printf("atan 0.25 = %lf\n", a);     /*  0.245   */
      }
      {                       /*  less accuracy   */
      float a = fatan(0.25);
      printf("atan 0.25 = %lf\n", (double)a);
      }
      return(0);
  }


 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE cos "cos,fcos commands"
@prev atan
@next exp

 @{b}cos
 fcos @{ub}

 NAME
  cos    - return cosine of a double quantity
  fcos   - return cosine of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = cos(b);
  double b;

  float  c = fcos(d);
  float  d;

 FUNCTION
  Returns the cosine of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = cos(0.25);
      printf("cos 0.25 = %lf\n", a);     /*  0.9689  */
      }
      {                       /*  less accuracy   */
      float a = fcos(0.25);
      printf("cos 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE exp "exp,fexp commands"
@prev cos
@next fabs

 @{b}exp
 fexp@{ub}

 NAME
  exp    - return e to the power of the double quantity
  fexp   - return e to the power of the float quantity

 SYNOPSIS
  #include <math.h>

  double a = exp(b);
  double b;

  float  c = fexp(d);
  float  d;

 FUNCTION
  Returns e to the power of the floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = exp(0.25);
      printf("exp 0.25 = %lf\n", a);     /*  1.284   */
      }
      {                       /*  less accuracy   */
      float a = fexp(0.25);
      printf("exp 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE fabs "fabs,ffabs commands"
@prev exp
@next log


 @{b}fabs
 ffabs@{ub}

 NAME
  fabs   - return the absolute value of a double quantity
  ffabs  - return the absolute value of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = fabs(b);
  double b;

  float  c = ffabs(d);
  float  d;

 FUNCTION
  Returns the absolute value of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = fabs(-0.25);
      printf("fabs -0.25 = %lf\n", a);     /*  0.25    */
      }
      {                       /*  less accuracy   */
      float a = ffabs(-0.25);
      printf("fabs -0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE log "log,flog commands"
@prev fabs
@next log10

 @{b}log
 flog @{ub}

 NAME
  log    - return the log of the double quantity, base e
  flog   - return the log of the float quantity, base e

 SYNOPSIS
  #include <math.h>

  double a = log(b);
  double b;

  float  c = flog(d);
  float  d;

 FUNCTION
  Returns the log of the floating point quantity, base e.

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = log(0.25);
      printf("log 0.25 = %lf\n", a);     /*  -1.3863 */
      }
      {                       /*  less accuracy   */
      float a = flog(0.25);
      printf("log 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE log10 "log10,flog10 commands"
@prev log
@next pow

 @{b}log10
 flog10 @{ub}

 NAME
  log    - return the log of the double quantity, base 10
  flog   - return the log of the float quantity, base 10

 SYNOPSIS
  #include <math.h>

  double a = log10(b);
  double b;

  float  c = flog10(d);
  float  d;

 FUNCTION
  Returns the log of the floating point quantity, base 10.

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = log10(0.25);
      printf("log10 0.25 = %lf\n", a);     /*  -0.6021 */
      }
      {                       /*  less accuracy   */
      float a = flog10(0.25);
      printf("log10 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE pow "pow,fpow commands"
@prev log10
@next sin

 @{b}pow
 fpow @{ub}

 NAME
  pow    - return one double to the power of another
  fpow   - return one float to the power of another

 SYNOPSIS
  #include <math.h>

  double a = pow(b, bp);
  double bp;
  double b;

  float  c = flog(d, dp);
  float  dp;
  float  d;

 FUNCTION
  Returns the power of one fp quantity to another.

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = pow(0.25, 4.0);
      printf("pow 0.25 ^^ 4.0 = %lf\n", a);     /*  0.0039 */
      }
      {                       /*  less accuracy   */
      float a = fpow(0.25, 4.0);
      printf("pow 0.25 ^^ 4.0 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value (base)
  double bp;  double floating point value (exponent)
  float  d;   float  floating point value (base)
  float  dp;  float  floating point value (exponent)

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE sin "sin,fsin commands"
@prev pow
@next sqrt

 @{b}sin
 fsin @{ub}

 NAME
  sin    - return sine of a double quantity
  fsin   - return sine of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = sin(b);
  double b;

  float  c = fsin(d);
  float  d;

 FUNCTION
  Returns the sine of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = sin(0.25);
      printf("sin 0.25 = %lf\n", a);     /*  0.2474  */
      }
      {                       /*  less accuracy   */
      float a = fsin(0.25);
      printf("sin 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE

@NODE sqrt "sqrt,fsqrt commands"
@prev sin
@next tan

 @{b}sqrt
 fsqrt @{ub}

 NAME
  sqrt   - return the square root of a double quantity
  fsqrt  - return the square root of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = sqrt(b);
  double b;

  float  c = fsqrt(d);
  float  d;

 FUNCTION
  Returns the square root of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = sqrt(0.25);
      printf("sqrt 0.25 = %lf\n", a);     /*  0.5000  */
      }
      {                       /*  less accuracy   */
      float a = fsqrt(0.25);
      printf("sqrt 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value

 SEE ALSO
  acos, asin, atan, cos, exp, fabs, log, log10, pow, sin, sqrt, tan
  facos, fasin, ...


@ENDNODE

@NODE tan "tan,ftan commands"
@prev sqrt
@next main

 @{b}tan
 ftan @{ub}

 NAME
  tan    - return tan of a double quantity
  ftan   - return tan of a float quantity

 SYNOPSIS
  #include <math.h>

  double a = tan(b);
  double b;

  float  c = ftan(d);
  float  d;

 FUNCTION
  Returns the tan of a floating point quantity

 EXAMPLE
  /*
   *  compile with the math library -lm
   */

  #include <math.h>
  #include <stdio.h>

  main()
  {
      {
      double a = tan(0.25);
      printf("tan 0.25 = %lf\n", a);     /*  0.2553  */
      }
      {                       /*  less accuracy   */
      float a = ftan(0.25);
      printf("tan 0.25 = %lf\n", (double)a);
      }
      return(0);
  }

 INPUTS
  double b;   double floating point value
  float  d;   float  floating point value

 RESULTS
  double a;   result double floating point value
  float  c;   result float  floating point value


@ENDNODE
