set_precision Subroutine

public subroutine set_precision(precision)

Set the precision for real numbers

Arguments

Type IntentOptional Attributes Name
integer(kind=default_int), intent(in) :: precision

Source Code

   subroutine set_precision(precision)
      !! Set the precision for real numbers
      integer(default_int), intent(in) :: precision
      if (precision > 0) then
         dp_precision = precision
      else
         print *, "Warning: Precision must be positive. Using default."
         dp_precision = default_dp_precision
      end if
   end subroutine set_precision