| 
830 | 830 |        (< y (first more)))  | 
831 | 831 |      false)))  | 
832 | 832 | 
 
  | 
833 |  | -(defn inc  | 
834 |  | -  "Returns a number one greater than num."  | 
 | 833 | +(defn inc'  | 
 | 834 | +  "Returns a number one greater than num. Supports arbitrary precision.  | 
 | 835 | +  See also: inc"  | 
835 | 836 |   {:inline (fn [x] `(. clojure.lang.Numbers (incP ~x)))  | 
836 | 837 |    :added "1.0"}  | 
837 | 838 |   [x] (. clojure.lang.Numbers (incP x)))  | 
838 | 839 | 
 
  | 
839 |  | -(defn inc'  | 
 | 840 | +(defn inc  | 
840 | 841 |   "Returns a number one greater than num. Does not auto-promote  | 
841 |  | -  longs, will throw on overflow"  | 
 | 842 | +  longs, will throw on overflow. See also: inc'"  | 
842 | 843 |   {:inline (fn [x] `(. clojure.lang.Numbers (inc ~x)))  | 
843 | 844 |    :added "1.2"}  | 
844 | 845 |   [x] (. clojure.lang.Numbers (inc x)))  | 
 | 
869 | 870 |     (reduce1 conj () coll))  | 
870 | 871 | 
 
  | 
871 | 872 | ;;math stuff  | 
872 |  | -(defn +  | 
873 |  | -  "Returns the sum of nums. (+) returns 0."  | 
 | 873 | +(defn +'  | 
 | 874 | +  "Returns the sum of nums. (+) returns 0. Supports arbitrary precision.  | 
 | 875 | +  See also: +"  | 
874 | 876 |   {:inline (fn [x y] `(. clojure.lang.Numbers (addP ~x ~y)))  | 
875 | 877 |    :inline-arities #{2}  | 
876 | 878 |    :added "1.0"}  | 
877 | 879 |   ([] 0)  | 
878 | 880 |   ([x] (cast Number x))  | 
879 | 881 |   ([x y] (. clojure.lang.Numbers (addP x y)))  | 
880 | 882 |   ([x y & more]  | 
881 |  | -   (reduce1 + (+ x y) more)))  | 
 | 883 | +   (reduce1 +' (+' x y) more)))  | 
882 | 884 | 
 
  | 
883 |  | -(defn +'  | 
 | 885 | +(defn +  | 
884 | 886 |   "Returns the sum of nums. (+) returns 0. Does not auto-promote  | 
885 |  | -  longs, will throw on overflow."  | 
 | 887 | +  longs, will throw on overflow. See also: +'"  | 
886 | 888 |   {:inline (fn [x y] `(. clojure.lang.Numbers (add ~x ~y)))  | 
887 | 889 |    :inline-arities #{2}  | 
888 | 890 |    :added "1.2"}  | 
889 | 891 |   ([] 0)  | 
890 | 892 |   ([x] (cast Number x))  | 
891 | 893 |   ([x y] (. clojure.lang.Numbers (add x y)))  | 
892 | 894 |   ([x y & more]  | 
893 |  | -     (reduce1 +' (+' x y) more)))  | 
 | 895 | +     (reduce1 + (+ x y) more)))  | 
894 | 896 | 
 
  | 
895 |  | -(defn *  | 
896 |  | -  "Returns the product of nums. (*) returns 1."  | 
 | 897 | +(defn *'  | 
 | 898 | +  "Returns the product of nums. (*) returns 1. Supports arbitrary precision.  | 
 | 899 | +  See also: *"  | 
897 | 900 |   {:inline (fn [x y] `(. clojure.lang.Numbers (multiplyP ~x ~y)))  | 
898 | 901 |    :inline-arities #{2}  | 
899 | 902 |    :added "1.0"}  | 
900 | 903 |   ([] 1)  | 
901 | 904 |   ([x] (cast Number x))  | 
902 | 905 |   ([x y] (. clojure.lang.Numbers (multiplyP x y)))  | 
903 | 906 |   ([x y & more]  | 
904 |  | -   (reduce1 * (* x y) more)))  | 
 | 907 | +   (reduce1 *' (*' x y) more)))  | 
905 | 908 | 
 
  | 
906 |  | -(defn *'  | 
 | 909 | +(defn *  | 
907 | 910 |   "Returns the product of nums. (*) returns 1. Does not auto-promote  | 
908 |  | -  longs, will throw on overflow."  | 
 | 911 | +  longs, will throw on overflow. See also: *'"  | 
909 | 912 |   {:inline (fn [x y] `(. clojure.lang.Numbers (multiply ~x ~y)))  | 
910 | 913 |    :inline-arities #{2}  | 
911 | 914 |    :added "1.2"}  | 
912 | 915 |   ([] 1)  | 
913 | 916 |   ([x] (cast Number x))  | 
914 | 917 |   ([x y] (. clojure.lang.Numbers (multiply x y)))  | 
915 | 918 |   ([x y & more]  | 
916 |  | -     (reduce1 *' (*' x y) more)))  | 
 | 919 | +     (reduce1 * (* x y) more)))  | 
917 | 920 | 
 
  | 
918 | 921 | (defn /  | 
919 | 922 |   "If no denominators are supplied, returns 1/numerator,  | 
 | 
926 | 929 |   ([x y & more]  | 
927 | 930 |    (reduce1 / (/ x y) more)))  | 
928 | 931 | 
 
  | 
929 |  | -(defn -  | 
 | 932 | +(defn -'  | 
930 | 933 |   "If no ys are supplied, returns the negation of x, else subtracts  | 
931 |  | -  the ys from x and returns the result."  | 
 | 934 | +  the ys from x and returns the result. Supports arbitrary precision.  | 
 | 935 | +  See also: -"  | 
932 | 936 |   {:inline (fn [& args] `(. clojure.lang.Numbers (minusP ~@args)))  | 
933 | 937 |    :inline-arities #{1 2}  | 
934 | 938 |    :added "1.0"}  | 
935 | 939 |   ([x] (. clojure.lang.Numbers (minusP x)))  | 
936 | 940 |   ([x y] (. clojure.lang.Numbers (minusP x y)))  | 
937 | 941 |   ([x y & more]  | 
938 |  | -   (reduce1 - (- x y) more)))  | 
 | 942 | +   (reduce1 -' (-' x y) more)))  | 
939 | 943 | 
 
  | 
940 |  | -(defn -'  | 
 | 944 | +(defn -  | 
941 | 945 |   "If no ys are supplied, returns the negation of x, else subtracts  | 
942 | 946 |   the ys from x and returns the result. Does not auto-promote  | 
943 |  | -  longs, will throw on overflow."  | 
 | 947 | +  longs, will throw on overflow. See also: -'"  | 
944 | 948 |   {:inline (fn [& args] `(. clojure.lang.Numbers (minus ~@args)))  | 
945 | 949 |    :inline-arities #{1 2}  | 
946 | 950 |    :added "1.2"}  | 
947 | 951 |   ([x] (. clojure.lang.Numbers (minus x)))  | 
948 | 952 |   ([x y] (. clojure.lang.Numbers (minus x y)))  | 
949 | 953 |   ([x y & more]  | 
950 |  | -     (reduce1 -' (-' x y) more)))  | 
 | 954 | +     (reduce1 - (- x y) more)))  | 
951 | 955 | 
 
  | 
952 | 956 | (defn <=  | 
953 | 957 |   "Returns non-nil if nums are in monotonically non-decreasing order,  | 
 | 
1027 | 1031 |   ([x y & more]  | 
1028 | 1032 |    (reduce1 min (min x y) more)))  | 
1029 | 1033 | 
 
  | 
1030 |  | -(defn dec  | 
1031 |  | -  "Returns a number one less than num."  | 
 | 1034 | +(defn dec'  | 
 | 1035 | +  "Returns a number one less than num. Supports arbitrary precision.  | 
 | 1036 | +  See also: dec"  | 
1032 | 1037 |   {:inline (fn [x] `(. clojure.lang.Numbers (decP ~x)))  | 
1033 | 1038 |    :added "1.0"}  | 
1034 | 1039 |   [x] (. clojure.lang.Numbers (decP x)))  | 
1035 | 1040 | 
 
  | 
1036 |  | -(defn dec'  | 
 | 1041 | +(defn dec  | 
1037 | 1042 |   "Returns a number one less than num. Does not auto-promote  | 
1038 |  | -  longs, will throw on overflow."  | 
 | 1043 | +  longs, will throw on overflow. See also: dec'"  | 
1039 | 1044 |   {:inline (fn [x] `(. clojure.lang.Numbers (dec ~x)))  | 
1040 | 1045 |    :added "1.2"}  | 
1041 | 1046 |   [x] (. clojure.lang.Numbers (dec x)))  | 
 | 
0 commit comments