anchor.diff:  ! =================================================================================================
   !  Mathlib Bouncer
  -!  Last modified: 2018-04-27
  +!  Last modified: 2018-10-23
   ! =================================================================================================
   module mathlib_bouncer
   
     use floatPrecision
  -! use, intrinsic :: ieee_arithmetic
  -  use, intrinsic :: iso_fortran_env, only : real64, int64
  +
     implicit none
  -
  -  !These are the actual "bouncy functions" users are supposed to call
  -  public :: sin_mb, asin_mb, sinh_mb, cos_mb, acos_mb, cosh_mb, tan_mb, atan_mb, atan2_mb, exp_mb, log_mb, log10_mb, isnan_mb
  -
  -! real(kind=fPrec), parameter :: mb_pi   = 3.1415926535897932d0
  -! real(kind=fPrec), parameter :: mb_pi2  = 1.5707963267948966d0
  +  private
  +
  +  public :: sin_mb, asin_mb, sinh_mb, cos_mb, acos_mb, cosh_mb
  +  public :: tan_mb, atan_mb, atan2_mb, exp_mb, log_mb, log10_mb, isnan_mb
  +
     real(kind=fPrec), parameter :: mb_pi   = 3.141592653589793238462643383279502884197169399375105820974_fPrec
     real(kind=fPrec), parameter :: mb_pi2  = 1.570796326794896619231321691639751442098584699687552910487_fPrec
  -! #ifdef NAGFOR
  -!   real(kind=fPrec), parameter :: mb_qnan = ieee_value(1.0_fPrec, ieee_quiet_nan)
  -! #else
  -!   real(kind=fPrec), parameter :: mb_qnan = transfer(-2251799813685248_int64, 1.0_real64)
  -! #endif
  -
  -  !For linking with CRLIBM
  +
  +  ! For linking with CRLIBM
   #ifdef CRLIBM
  -
   #ifdef ROUND_NEAR
     private :: acos_rn, asin_rn, atan2_rn
   #endif
  -
   #ifdef ROUND_UP
     private :: acos_ru, asin_ru, atan2_ru
   #endif
  -
   #ifdef ROUND_DOWN
     private :: acos_rd, asin_rd, atan2_rd
   #endif
  -
   #ifdef ROUND_ZERO
     private :: acos_rz, asin_rz, atan2_rz
   #endif
   
  -  !Can't declare them private as they have BIND labels,
  -  ! however they should not be called from outside this module.
  -  !private :: exp_rn, log_rn, log10_rn, atan_rn, tan_rn, sin_rn, cos_rn, sinh_rn, cosh_rn
  -
  -  !! Interface definitions for the other functions in crlibm
  +  ! Interface definitions for the other functions in CRLIBM
     interface
   
   #ifdef ROUND_NEAR
  -     real(kind=c_double) function exp_rn(arg) bind(C,name="exp_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function exp_rn
  -
  -     real(kind=c_double) function log_rn(arg) bind(C,name="log_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log_rn
  -
  -     real(kind=c_double) function log10_rn(arg) bind(C,name="log10_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log10_rn
  -
  -     real(kind=c_double) function atan_rn(arg) bind(C,name="atan_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function atan_rn
  -
  -     real(kind=c_double) function tan_rn(arg) bind(C,name="tan_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function tan_rn
  -
  -     real(kind=c_double) function sin_rn(arg) bind(C,name="sin_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sin_rn
  -
  -     real(kind=c_double) function cos_rn(arg) bind(C,name="cos_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cos_rn
  -
  -     real(kind=c_double) function sinh_rn(arg) bind(C,name="sinh_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sinh_rn
  -
  -     real(kind=c_double) function cosh_rn(arg) bind(C,name="cosh_rn")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cosh_rn
  -#endif
  -
  -#ifdef ROUND_UP
  -     real(kind=c_double) function exp_ru(arg) bind(C,name="exp_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function exp_ru
  -
  -     real(kind=c_double) function log_ru(arg) bind(C,name="log_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log_ru
  -
  -     real(kind=c_double) function log10_ru(arg) bind(C,name="log10_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log10_ru
  -
  -     real(kind=c_double) function atan_ru(arg) bind(C,name="atan_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function atan_ru
  -
  -     real(kind=c_double) function tan_ru(arg) bind(C,name="tan_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function tan_ru
  -
  -     real(kind=c_double) function sin_ru(arg) bind(C,name="sin_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sin_ru
  -
  -     real(kind=c_double) function cos_ru(arg) bind(C,name="cos_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cos_ru
  -
  -     real(kind=c_double) function sinh_ru(arg) bind(C,name="sinh_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sinh_ru
  -
  -     real(kind=c_double) function cosh_ru(arg) bind(C,name="cosh_ru")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cosh_ru
  -#endif
  -
  -#ifdef ROUND_DOWN
  -     real(kind=c_double) function exp_rd(arg) bind(C,name="exp_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function exp_rd
  -
  -     real(kind=c_double) function log_rd(arg) bind(C,name="log_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log_rd
  -
  -     real(kind=c_double) function log10_rd(arg) bind(C,name="log10_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log10_rd
  -
  -     real(kind=c_double) function atan_rd(arg) bind(C,name="atan_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function atan_rd
  -
  -     real(kind=c_double) function tan_rd(arg) bind(C,name="tan_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function tan_rd
  -
  -     real(kind=c_double) function sin_rd(arg) bind(C,name="sin_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sin_rd
  -
  -     real(kind=c_double) function cos_rd(arg) bind(C,name="cos_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cos_rd
  -
  -     real(kind=c_double) function sinh_rd(arg) bind(C,name="sinh_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sinh_rd
  -
  -     real(kind=c_double) function cosh_rd(arg) bind(C,name="cosh_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cosh_rd
  -#endif
  -
  -#ifdef ROUND_ZERO
  -     real(kind=c_double) function exp_rz(arg) bind(C,name="exp_rd")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function exp_rz
  -
  -     real(kind=c_double) function log_rz(arg) bind(C,name="log_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log_rz
  -
  -     real(kind=c_double) function log10_rz(arg) bind(C,name="log10_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function log10_rz
  -
  -     real(kind=c_double) function atan_rz(arg) bind(C,name="atan_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function atan_rz
  -
  -     real(kind=c_double) function tan_rz(arg) bind(C,name="tan_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function tan_rz
  -
  -     real(kind=c_double) function sin_rz(arg) bind(C,name="sin_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sin_rz
  -
  -     real(kind=c_double) function cos_rz(arg) bind(C,name="cos_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cos_rz
  -
  -     real(kind=c_double) function sinh_rz(arg) bind(C,name="sinh_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function sinh_rz
  -
  -     real(kind=c_double) function cosh_rz(arg) bind(C,name="cosh_rz")
  -       use, intrinsic :: iso_c_binding, only : c_double
  -       implicit none
  -       real(kind=c_double), intent(in), VALUE :: arg
  -     end function cosh_rz
  +    real(kind=c_double) pure function exp_rn(arg) bind(C,name="exp_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function exp_rn
  +
  +    real(kind=c_double) pure function log_rn(arg) bind(C,name="log_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log_rn
  +
  +    real(kind=c_double) pure function log10_rn(arg) bind(C,name="log10_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log10_rn
  +
  +    real(kind=c_double) pure function atan_rn(arg) bind(C,name="atan_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function atan_rn
  +
  +    real(kind=c_double) pure function tan_rn(arg) bind(C,name="tan_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function tan_rn
  +
  +    real(kind=c_double) pure function sin_rn(arg) bind(C,name="sin_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sin_rn
  +
  +    real(kind=c_double) pure function cos_rn(arg) bind(C,name="cos_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cos_rn
  +
  +    real(kind=c_double) pure function sinh_rn(arg) bind(C,name="sinh_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sinh_rn
  +
  +    real(kind=c_double) pure function cosh_rn(arg) bind(C,name="cosh_rn")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cosh_rn
  +#endif
  +
  +#ifdef ROUND_UP
  +    real(kind=c_double) pure function exp_ru(arg) bind(C,name="exp_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function exp_ru
  +
  +    real(kind=c_double) pure function log_ru(arg) bind(C,name="log_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log_ru
  +
  +    real(kind=c_double) pure function log10_ru(arg) bind(C,name="log10_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log10_ru
  +
  +    real(kind=c_double) pure function atan_ru(arg) bind(C,name="atan_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function atan_ru
  +
  +    real(kind=c_double) pure function tan_ru(arg) bind(C,name="tan_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function tan_ru
  +
  +    real(kind=c_double) pure function sin_ru(arg) bind(C,name="sin_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sin_ru
  +
  +    real(kind=c_double) pure function cos_ru(arg) bind(C,name="cos_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cos_ru
  +
  +    real(kind=c_double) pure function sinh_ru(arg) bind(C,name="sinh_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sinh_ru
  +
  +    real(kind=c_double) pure function cosh_ru(arg) bind(C,name="cosh_ru")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cosh_ru
  +#endif
  +
  +#ifdef ROUND_DOWN
  +    real(kind=c_double) pure function exp_rd(arg) bind(C,name="exp_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function exp_rd
  +
  +    real(kind=c_double) pure function log_rd(arg) bind(C,name="log_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log_rd
  +
  +    real(kind=c_double) pure function log10_rd(arg) bind(C,name="log10_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log10_rd
  +
  +    real(kind=c_double) pure function atan_rd(arg) bind(C,name="atan_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function atan_rd
  +
  +    real(kind=c_double) pure function tan_rd(arg) bind(C,name="tan_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function tan_rd
  +
  +    real(kind=c_double) pure function sin_rd(arg) bind(C,name="sin_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sin_rd
  +
  +    real(kind=c_double) pure function cos_rd(arg) bind(C,name="cos_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cos_rd
  +
  +    real(kind=c_double) pure function sinh_rd(arg) bind(C,name="sinh_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sinh_rd
  +
  +    real(kind=c_double) pure function cosh_rd(arg) bind(C,name="cosh_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cosh_rd
  +#endif
  +
  +#ifdef ROUND_ZERO
  +    real(kind=c_double) pure function exp_rz(arg) bind(C,name="exp_rd")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function exp_rz
  +
  +    real(kind=c_double) pure function log_rz(arg) bind(C,name="log_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log_rz
  +
  +    real(kind=c_double) pure function log10_rz(arg) bind(C,name="log10_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function log10_rz
  +
  +    real(kind=c_double) pure function atan_rz(arg) bind(C,name="atan_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function atan_rz
  +
  +    real(kind=c_double) pure function tan_rz(arg) bind(C,name="tan_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function tan_rz
  +
  +    real(kind=c_double) pure function sin_rz(arg) bind(C,name="sin_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sin_rz
  +
  +    real(kind=c_double) pure function cos_rz(arg) bind(C,name="cos_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cos_rz
  +
  +    real(kind=c_double) pure function sinh_rz(arg) bind(C,name="sinh_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function sinh_rz
  +
  +    real(kind=c_double) pure function cosh_rz(arg) bind(C,name="cosh_rz")
  +      use, intrinsic :: iso_c_binding, only : c_double
  +      real(kind=c_double), intent(in), value :: arg
  +    end function cosh_rz
   #endif
   
     end interface
  
positive.code: #endif
    end function asin_mb
  
    real(kind=fPrec) function sinh_mb(arg)
      implicit none
      real(kind=fPrec) arg
      intent(in) arg
  
  #ifndef CRLIBM
      !Input KIND = output KIND
      sinh_mb=sinh(arg)
  #else
  #ifdef ROUND_NEAR
  
negative.code: #endif
    end function acos_mb
  
    real(kind=fPrec) pure function cosh_mb(arg)
      real(kind=fPrec), intent(in) :: arg
  #ifndef CRLIBM
      cosh_mb=cosh(arg)
  #else
  #ifdef ROUND_NEAR
  