ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_mathCompare.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 end if
202
203!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204
206
207 use pm_kind, only: SK, IK, LK
208 implicit none
209
210 character(*, SK), parameter :: MODULE_NAME = "@pm_mathCompare"
211
212!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213
240 end type
241
268#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
269 !DIR$ ATTRIBUTES DLLEXPORT :: REFERENCE
270#endif
271
272!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273
300 end type
301
327 type(strong_type), parameter :: STRONG = strong_type()
328#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
329 !DIR$ ATTRIBUTES DLLEXPORT :: STRONG
330#endif
331
332!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
333
359 type :: weak_type
360 end type
361
387 type(weak_type), parameter :: WEAK = weak_type()
388#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
389 !DIR$ ATTRIBUTES DLLEXPORT :: WEAK
390#endif
391
392!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
393
419 type :: mean_type
420 end type
421
447 type(mean_type), parameter :: MEAN = mean_type()
448#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
449 !DIR$ ATTRIBUTES DLLEXPORT :: MEAN
450#endif
451
452!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
453
535 interface isClose
536
537 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
538 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
539 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
540
541 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
542
543#if CK5_ENABLED
544 PURE elemental module function isCloseDefault_CK5(x, y, reltol, abstol) result(close)
545#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
546 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_CK5
547#endif
548 use pm_kind, only: CKG => CK5
549 complex(CKG) , intent(in) :: x, y
550 real(CKG) , intent(in), optional :: reltol, abstol
551 logical(LK) :: close
552 end function
553#endif
554
555#if CK4_ENABLED
556 PURE elemental module function isCloseDefault_CK4(x, y, reltol, abstol) result(close)
557#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
558 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_CK4
559#endif
560 use pm_kind, only: CKG => CK4
561 complex(CKG) , intent(in) :: x, y
562 real(CKG) , intent(in), optional :: reltol, abstol
563 logical(LK) :: close
564 end function
565#endif
566
567#if CK3_ENABLED
568 PURE elemental module function isCloseDefault_CK3(x, y, reltol, abstol) result(close)
569#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
570 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_CK3
571#endif
572 use pm_kind, only: CKG => CK3
573 complex(CKG) , intent(in) :: x, y
574 real(CKG) , intent(in), optional :: reltol, abstol
575 logical(LK) :: close
576 end function
577#endif
578
579#if CK2_ENABLED
580 PURE elemental module function isCloseDefault_CK2(x, y, reltol, abstol) result(close)
581#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
582 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_CK2
583#endif
584 use pm_kind, only: CKG => CK2
585 complex(CKG) , intent(in) :: x, y
586 real(CKG) , intent(in), optional :: reltol, abstol
587 logical(LK) :: close
588 end function
589#endif
590
591#if CK1_ENABLED
592 PURE elemental module function isCloseDefault_CK1(x, y, reltol, abstol) result(close)
593#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
594 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_CK1
595#endif
596 use pm_kind, only: CKG => CK1
597 complex(CKG) , intent(in) :: x, y
598 real(CKG) , intent(in), optional :: reltol, abstol
599 logical(LK) :: close
600 end function
601#endif
602
603 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
604
605#if RK5_ENABLED
606 PURE elemental module function isCloseDefault_RK5(x, y, reltol, abstol) result(close)
607#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
608 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_RK5
609#endif
610 use pm_kind, only: RKG => RK5
611 real(RKG) , intent(in) :: x, y
612 real(RKG) , intent(in), optional :: reltol, abstol
613 logical(LK) :: close
614 end function
615#endif
616
617#if RK4_ENABLED
618 PURE elemental module function isCloseDefault_RK4(x, y, reltol, abstol) result(close)
619#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
620 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_RK4
621#endif
622 use pm_kind, only: RKG => RK4
623 real(RKG) , intent(in) :: x, y
624 real(RKG) , intent(in), optional :: reltol, abstol
625 logical(LK) :: close
626 end function
627#endif
628
629#if RK3_ENABLED
630 PURE elemental module function isCloseDefault_RK3(x, y, reltol, abstol) result(close)
631#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
632 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_RK3
633#endif
634 use pm_kind, only: RKG => RK3
635 real(RKG) , intent(in) :: x, y
636 real(RKG) , intent(in), optional :: reltol, abstol
637 logical(LK) :: close
638 end function
639#endif
640
641#if RK2_ENABLED
642 PURE elemental module function isCloseDefault_RK2(x, y, reltol, abstol) result(close)
643#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
644 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_RK2
645#endif
646 use pm_kind, only: RKG => RK2
647 real(RKG) , intent(in) :: x, y
648 real(RKG) , intent(in), optional :: reltol, abstol
649 logical(LK) :: close
650 end function
651#endif
652
653#if RK1_ENABLED
654 PURE elemental module function isCloseDefault_RK1(x, y, reltol, abstol) result(close)
655#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
656 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseDefault_RK1
657#endif
658 use pm_kind, only: RKG => RK1
659 real(RKG) , intent(in) :: x, y
660 real(RKG) , intent(in), optional :: reltol, abstol
661 logical(LK) :: close
662 end function
663#endif
664
665 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
666
667 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
668 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
669 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
670
671 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672
673#if CK5_ENABLED
674 PURE elemental module function isCloseReference_CK5(x, y, method, reltol, abstol) result(close)
675#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
676 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_CK5
677#endif
678 use pm_kind, only: CKG => CK5
679 complex(CKG) , intent(in) :: x, y
680 type(reference_type), intent(in) :: method
681 real(CKG) , intent(in), optional :: reltol, abstol
682 logical(LK) :: close
683 end function
684#endif
685
686#if CK4_ENABLED
687 PURE elemental module function isCloseReference_CK4(x, y, method, reltol, abstol) result(close)
688#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
689 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_CK4
690#endif
691 use pm_kind, only: CKG => CK4
692 complex(CKG) , intent(in) :: x, y
693 type(reference_type), intent(in) :: method
694 real(CKG) , intent(in), optional :: reltol, abstol
695 logical(LK) :: close
696 end function
697#endif
698
699#if CK3_ENABLED
700 PURE elemental module function isCloseReference_CK3(x, y, method, reltol, abstol) result(close)
701#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
702 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_CK3
703#endif
704 use pm_kind, only: CKG => CK3
705 complex(CKG) , intent(in) :: x, y
706 type(reference_type), intent(in) :: method
707 real(CKG) , intent(in), optional :: reltol, abstol
708 logical(LK) :: close
709 end function
710#endif
711
712#if CK2_ENABLED
713 PURE elemental module function isCloseReference_CK2(x, y, method, reltol, abstol) result(close)
714#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
715 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_CK2
716#endif
717 use pm_kind, only: CKG => CK2
718 complex(CKG) , intent(in) :: x, y
719 type(reference_type), intent(in) :: method
720 real(CKG) , intent(in), optional :: reltol, abstol
721 logical(LK) :: close
722 end function
723#endif
724
725#if CK1_ENABLED
726 PURE elemental module function isCloseReference_CK1(x, y, method, reltol, abstol) result(close)
727#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
728 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_CK1
729#endif
730 use pm_kind, only: CKG => CK1
731 complex(CKG) , intent(in) :: x, y
732 type(reference_type), intent(in) :: method
733 real(CKG) , intent(in), optional :: reltol, abstol
734 logical(LK) :: close
735 end function
736#endif
737
738 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
739
740#if RK5_ENABLED
741 PURE elemental module function isCloseReference_RK5(x, y, method, reltol, abstol) result(close)
742#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
743 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_RK5
744#endif
745 use pm_kind, only: RKG => RK5
746 real(RKG) , intent(in) :: x, y
747 type(reference_type), intent(in) :: method
748 real(RKG) , intent(in), optional :: reltol, abstol
749 logical(LK) :: close
750 end function
751#endif
752
753#if RK4_ENABLED
754 PURE elemental module function isCloseReference_RK4(x, y, method, reltol, abstol) result(close)
755#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
756 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_RK4
757#endif
758 use pm_kind, only: RKG => RK4
759 real(RKG) , intent(in) :: x, y
760 type(reference_type), intent(in) :: method
761 real(RKG) , intent(in), optional :: reltol, abstol
762 logical(LK) :: close
763 end function
764#endif
765
766#if RK3_ENABLED
767 PURE elemental module function isCloseReference_RK3(x, y, method, reltol, abstol) result(close)
768#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
769 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_RK3
770#endif
771 use pm_kind, only: RKG => RK3
772 real(RKG) , intent(in) :: x, y
773 type(reference_type), intent(in) :: method
774 real(RKG) , intent(in), optional :: reltol, abstol
775 logical(LK) :: close
776 end function
777#endif
778
779#if RK2_ENABLED
780 PURE elemental module function isCloseReference_RK2(x, y, method, reltol, abstol) result(close)
781#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
782 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_RK2
783#endif
784 use pm_kind, only: RKG => RK2
785 real(RKG) , intent(in) :: x, y
786 type(reference_type), intent(in) :: method
787 real(RKG) , intent(in), optional :: reltol, abstol
788 logical(LK) :: close
789 end function
790#endif
791
792#if RK1_ENABLED
793 PURE elemental module function isCloseReference_RK1(x, y, method, reltol, abstol) result(close)
794#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
795 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseReference_RK1
796#endif
797 use pm_kind, only: RKG => RK1
798 real(RKG) , intent(in) :: x, y
799 type(reference_type), intent(in) :: method
800 real(RKG) , intent(in), optional :: reltol, abstol
801 logical(LK) :: close
802 end function
803#endif
804
805 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
806
807 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
808 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
809 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
810
811 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
812
813#if CK5_ENABLED
814 PURE elemental module function isCloseStrong_CK5(x, y, method, reltol, abstol) result(close)
815#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
816 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_CK5
817#endif
818 use pm_kind, only: CKG => CK5
819 complex(CKG) , intent(in) :: x, y
820 type(strong_type) , intent(in) :: method
821 real(CKG) , intent(in), optional :: reltol, abstol
822 logical(LK) :: close
823 end function
824#endif
825
826#if CK4_ENABLED
827 PURE elemental module function isCloseStrong_CK4(x, y, method, reltol, abstol) result(close)
828#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
829 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_CK4
830#endif
831 use pm_kind, only: CKG => CK4
832 complex(CKG) , intent(in) :: x, y
833 type(strong_type) , intent(in) :: method
834 real(CKG) , intent(in), optional :: reltol, abstol
835 logical(LK) :: close
836 end function
837#endif
838
839#if CK3_ENABLED
840 PURE elemental module function isCloseStrong_CK3(x, y, method, reltol, abstol) result(close)
841#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
842 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_CK3
843#endif
844 use pm_kind, only: CKG => CK3
845 complex(CKG) , intent(in) :: x, y
846 type(strong_type) , intent(in) :: method
847 real(CKG) , intent(in), optional :: reltol, abstol
848 logical(LK) :: close
849 end function
850#endif
851
852#if CK2_ENABLED
853 PURE elemental module function isCloseStrong_CK2(x, y, method, reltol, abstol) result(close)
854#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
855 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_CK2
856#endif
857 use pm_kind, only: CKG => CK2
858 complex(CKG) , intent(in) :: x, y
859 type(strong_type) , intent(in) :: method
860 real(CKG) , intent(in), optional :: reltol, abstol
861 logical(LK) :: close
862 end function
863#endif
864
865#if CK1_ENABLED
866 PURE elemental module function isCloseStrong_CK1(x, y, method, reltol, abstol) result(close)
867#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
868 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_CK1
869#endif
870 use pm_kind, only: CKG => CK1
871 complex(CKG) , intent(in) :: x, y
872 type(strong_type) , intent(in) :: method
873 real(CKG) , intent(in), optional :: reltol, abstol
874 logical(LK) :: close
875 end function
876#endif
877
878 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
879
880#if RK5_ENABLED
881 PURE elemental module function isCloseStrong_RK5(x, y, method, reltol, abstol) result(close)
882#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
883 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_RK5
884#endif
885 use pm_kind, only: RKG => RK5
886 real(RKG) , intent(in) :: x, y
887 type(strong_type) , intent(in) :: method
888 real(RKG) , intent(in), optional :: reltol, abstol
889 logical(LK) :: close
890 end function
891#endif
892
893#if RK4_ENABLED
894 PURE elemental module function isCloseStrong_RK4(x, y, method, reltol, abstol) result(close)
895#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
896 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_RK4
897#endif
898 use pm_kind, only: RKG => RK4
899 real(RKG) , intent(in) :: x, y
900 type(strong_type) , intent(in) :: method
901 real(RKG) , intent(in), optional :: reltol, abstol
902 logical(LK) :: close
903 end function
904#endif
905
906#if RK3_ENABLED
907 PURE elemental module function isCloseStrong_RK3(x, y, method, reltol, abstol) result(close)
908#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
909 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_RK3
910#endif
911 use pm_kind, only: RKG => RK3
912 real(RKG) , intent(in) :: x, y
913 type(strong_type) , intent(in) :: method
914 real(RKG) , intent(in), optional :: reltol, abstol
915 logical(LK) :: close
916 end function
917#endif
918
919#if RK2_ENABLED
920 PURE elemental module function isCloseStrong_RK2(x, y, method, reltol, abstol) result(close)
921#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
922 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_RK2
923#endif
924 use pm_kind, only: RKG => RK2
925 real(RKG) , intent(in) :: x, y
926 type(strong_type) , intent(in) :: method
927 real(RKG) , intent(in), optional :: reltol, abstol
928 logical(LK) :: close
929 end function
930#endif
931
932#if RK1_ENABLED
933 PURE elemental module function isCloseStrong_RK1(x, y, method, reltol, abstol) result(close)
934#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
935 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseStrong_RK1
936#endif
937 use pm_kind, only: RKG => RK1
938 real(RKG) , intent(in) :: x, y
939 type(strong_type) , intent(in) :: method
940 real(RKG) , intent(in), optional :: reltol, abstol
941 logical(LK) :: close
942 end function
943#endif
944
945 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
946
947 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
948 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
949 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
950
951 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
952
953#if CK5_ENABLED
954 PURE elemental module function isCloseWeak_CK5(x, y, method, reltol, abstol) result(close)
955#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
956 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_CK5
957#endif
958 use pm_kind, only: CKG => CK5
959 complex(CKG) , intent(in) :: x, y
960 type(weak_type) , intent(in) :: method
961 real(CKG) , intent(in), optional :: reltol, abstol
962 logical(LK) :: close
963 end function
964#endif
965
966#if CK4_ENABLED
967 PURE elemental module function isCloseWeak_CK4(x, y, method, reltol, abstol) result(close)
968#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
969 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_CK4
970#endif
971 use pm_kind, only: CKG => CK4
972 complex(CKG) , intent(in) :: x, y
973 type(weak_type) , intent(in) :: method
974 real(CKG) , intent(in), optional :: reltol, abstol
975 logical(LK) :: close
976 end function
977#endif
978
979#if CK3_ENABLED
980 PURE elemental module function isCloseWeak_CK3(x, y, method, reltol, abstol) result(close)
981#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
982 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_CK3
983#endif
984 use pm_kind, only: CKG => CK3
985 complex(CKG) , intent(in) :: x, y
986 type(weak_type) , intent(in) :: method
987 real(CKG) , intent(in), optional :: reltol, abstol
988 logical(LK) :: close
989 end function
990#endif
991
992#if CK2_ENABLED
993 PURE elemental module function isCloseWeak_CK2(x, y, method, reltol, abstol) result(close)
994#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
995 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_CK2
996#endif
997 use pm_kind, only: CKG => CK2
998 complex(CKG) , intent(in) :: x, y
999 type(weak_type) , intent(in) :: method
1000 real(CKG) , intent(in), optional :: reltol, abstol
1001 logical(LK) :: close
1002 end function
1003#endif
1004
1005#if CK1_ENABLED
1006 PURE elemental module function isCloseWeak_CK1(x, y, method, reltol, abstol) result(close)
1007#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1008 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_CK1
1009#endif
1010 use pm_kind, only: CKG => CK1
1011 complex(CKG) , intent(in) :: x, y
1012 type(weak_type) , intent(in) :: method
1013 real(CKG) , intent(in), optional :: reltol, abstol
1014 logical(LK) :: close
1015 end function
1016#endif
1017
1018 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1019
1020#if RK5_ENABLED
1021 PURE elemental module function isCloseWeak_RK5(x, y, method, reltol, abstol) result(close)
1022#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1023 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_RK5
1024#endif
1025 use pm_kind, only: RKG => RK5
1026 real(RKG) , intent(in) :: x, y
1027 type(weak_type) , intent(in) :: method
1028 real(RKG) , intent(in), optional :: reltol, abstol
1029 logical(LK) :: close
1030 end function
1031#endif
1032
1033#if RK4_ENABLED
1034 PURE elemental module function isCloseWeak_RK4(x, y, method, reltol, abstol) result(close)
1035#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1036 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_RK4
1037#endif
1038 use pm_kind, only: RKG => RK4
1039 real(RKG) , intent(in) :: x, y
1040 type(weak_type) , intent(in) :: method
1041 real(RKG) , intent(in), optional :: reltol, abstol
1042 logical(LK) :: close
1043 end function
1044#endif
1045
1046#if RK3_ENABLED
1047 PURE elemental module function isCloseWeak_RK3(x, y, method, reltol, abstol) result(close)
1048#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1049 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_RK3
1050#endif
1051 use pm_kind, only: RKG => RK3
1052 real(RKG) , intent(in) :: x, y
1053 type(weak_type) , intent(in) :: method
1054 real(RKG) , intent(in), optional :: reltol, abstol
1055 logical(LK) :: close
1056 end function
1057#endif
1058
1059#if RK2_ENABLED
1060 PURE elemental module function isCloseWeak_RK2(x, y, method, reltol, abstol) result(close)
1061#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1062 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_RK2
1063#endif
1064 use pm_kind, only: RKG => RK2
1065 real(RKG) , intent(in) :: x, y
1066 type(weak_type) , intent(in) :: method
1067 real(RKG) , intent(in), optional :: reltol, abstol
1068 logical(LK) :: close
1069 end function
1070#endif
1071
1072#if RK1_ENABLED
1073 PURE elemental module function isCloseWeak_RK1(x, y, method, reltol, abstol) result(close)
1074#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1075 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseWeak_RK1
1076#endif
1077 use pm_kind, only: RKG => RK1
1078 real(RKG) , intent(in) :: x, y
1079 type(weak_type) , intent(in) :: method
1080 real(RKG) , intent(in), optional :: reltol, abstol
1081 logical(LK) :: close
1082 end function
1083#endif
1084
1085 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1086
1087 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1088 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1089 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1090
1091 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1092
1093#if CK5_ENABLED
1094 PURE elemental module function isCloseMean_CK5(x, y, method, reltol, abstol) result(close)
1095#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1096 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_CK5
1097#endif
1098 use pm_kind, only: CKG => CK5
1099 complex(CKG) , intent(in) :: x, y
1100 type(mean_type) , intent(in) :: method
1101 real(CKG) , intent(in), optional :: reltol, abstol
1102 logical(LK) :: close
1103 end function
1104#endif
1105
1106#if CK4_ENABLED
1107 PURE elemental module function isCloseMean_CK4(x, y, method, reltol, abstol) result(close)
1108#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1109 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_CK4
1110#endif
1111 use pm_kind, only: CKG => CK4
1112 complex(CKG) , intent(in) :: x, y
1113 type(mean_type) , intent(in) :: method
1114 real(CKG) , intent(in), optional :: reltol, abstol
1115 logical(LK) :: close
1116 end function
1117#endif
1118
1119#if CK3_ENABLED
1120 PURE elemental module function isCloseMean_CK3(x, y, method, reltol, abstol) result(close)
1121#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1122 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_CK3
1123#endif
1124 use pm_kind, only: CKG => CK3
1125 complex(CKG) , intent(in) :: x, y
1126 type(mean_type) , intent(in) :: method
1127 real(CKG) , intent(in), optional :: reltol, abstol
1128 logical(LK) :: close
1129 end function
1130#endif
1131
1132#if CK2_ENABLED
1133 PURE elemental module function isCloseMean_CK2(x, y, method, reltol, abstol) result(close)
1134#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1135 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_CK2
1136#endif
1137 use pm_kind, only: CKG => CK2
1138 complex(CKG) , intent(in) :: x, y
1139 type(mean_type) , intent(in) :: method
1140 real(CKG) , intent(in), optional :: reltol, abstol
1141 logical(LK) :: close
1142 end function
1143#endif
1144
1145#if CK1_ENABLED
1146 PURE elemental module function isCloseMean_CK1(x, y, method, reltol, abstol) result(close)
1147#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1148 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_CK1
1149#endif
1150 use pm_kind, only: CKG => CK1
1151 complex(CKG) , intent(in) :: x, y
1152 type(mean_type) , intent(in) :: method
1153 real(CKG) , intent(in), optional :: reltol, abstol
1154 logical(LK) :: close
1155 end function
1156#endif
1157
1158 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1159
1160#if RK5_ENABLED
1161 PURE elemental module function isCloseMean_RK5(x, y, method, reltol, abstol) result(close)
1162#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1163 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_RK5
1164#endif
1165 use pm_kind, only: RKG => RK5
1166 real(RKG) , intent(in) :: x, y
1167 type(mean_type) , intent(in) :: method
1168 real(RKG) , intent(in), optional :: reltol, abstol
1169 logical(LK) :: close
1170 end function
1171#endif
1172
1173#if RK4_ENABLED
1174 PURE elemental module function isCloseMean_RK4(x, y, method, reltol, abstol) result(close)
1175#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1176 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_RK4
1177#endif
1178 use pm_kind, only: RKG => RK4
1179 real(RKG) , intent(in) :: x, y
1180 type(mean_type) , intent(in) :: method
1181 real(RKG) , intent(in), optional :: reltol, abstol
1182 logical(LK) :: close
1183 end function
1184#endif
1185
1186#if RK3_ENABLED
1187 PURE elemental module function isCloseMean_RK3(x, y, method, reltol, abstol) result(close)
1188#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1189 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_RK3
1190#endif
1191 use pm_kind, only: RKG => RK3
1192 real(RKG) , intent(in) :: x, y
1193 type(mean_type) , intent(in) :: method
1194 real(RKG) , intent(in), optional :: reltol, abstol
1195 logical(LK) :: close
1196 end function
1197#endif
1198
1199#if RK2_ENABLED
1200 PURE elemental module function isCloseMean_RK2(x, y, method, reltol, abstol) result(close)
1201#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1202 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_RK2
1203#endif
1204 use pm_kind, only: RKG => RK2
1205 real(RKG) , intent(in) :: x, y
1206 type(mean_type) , intent(in) :: method
1207 real(RKG) , intent(in), optional :: reltol, abstol
1208 logical(LK) :: close
1209 end function
1210#endif
1211
1212#if RK1_ENABLED
1213 PURE elemental module function isCloseMean_RK1(x, y, method, reltol, abstol) result(close)
1214#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1215 !DEC$ ATTRIBUTES DLLEXPORT :: isCloseMean_RK1
1216#endif
1217 use pm_kind, only: RKG => RK1
1218 real(RKG) , intent(in) :: x, y
1219 type(mean_type) , intent(in) :: method
1220 real(RKG) , intent(in), optional :: reltol, abstol
1221 logical(LK) :: close
1222 end function
1223#endif
1224
1225 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1226
1227 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1228 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1229 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1230
1231 end interface isClose
1232
1233!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1234
1235end module pm_mathCompare ! LCOV_EXCL_LINE
Generate and return .true. if the two input values are sufficiently close to each other within the sp...
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK5
Definition: pm_kind.F90:478
integer, parameter RK4
Definition: pm_kind.F90:489
integer, parameter RK2
Definition: pm_kind.F90:511
integer, parameter CK1
Definition: pm_kind.F90:464
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CK5
Definition: pm_kind.F90:420
integer, parameter CK4
Definition: pm_kind.F90:431
integer, parameter CK2
Definition: pm_kind.F90:453
integer, parameter CK3
Definition: pm_kind.F90:442
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RK1
Definition: pm_kind.F90:522
This module contains the procedures and interfaces for evaluating the relative or absolute proximity ...
type(weak_type), parameter WEAK
This is a convenience constant object of type weak_type() that is exclusively provided to distinguish...
type(strong_type), parameter STRONG
This is a convenience constant object of type strong_type() that is exclusively provided to distingui...
character(*, SK), parameter MODULE_NAME
type(reference_type), parameter REFERENCE
This is a convenience constant object of type reference_type() that is exclusively provided to distin...
type(mean_type), parameter MEAN
This is a convenience constant object of type mean_type() that is exclusively provided to distinguish...
This is an empty derived type that is exclusively used to differentiate the procedures within the gen...
This is an empty derived type that is exclusively used to differentiate the procedures within the gen...
This is an empty derived type that is exclusively used to differentiate the procedures within the gen...
This is an empty derived type that is exclusively used to differentiate the procedures within the gen...