@@ -55,12 +55,10 @@ There are security implications for integer overflow in certain situations.
55
55
56
56
- This package is designed for easy use and written to be performant in many sorts of use.
57
57
58
- - All exported types are stable (e.g. ` typeof(SafeInt32 + 1) == SafeInt32 ` )
58
+ - All exported types are stable (e.g. ` typeof(SafeInt32(1) + 1) == SafeInt32 ` )
59
59
60
60
- Using _ SaferIntegers_ can preclude some known ways that insecure systems are breached.
61
61
62
- - Safer Rationals just work: ` SafeRational(161803398875,100000000000) `
63
-
64
62
### Test code for integer safety
65
63
66
64
- ` @saferintegers include(joinpath("PackageTestDirectory", "PackageTests.jl")) `
@@ -103,7 +101,6 @@ should a calculation encouter an overflow or underflow,
103
101
- ` abs ` , ` neg ` , ` div ` , ` fld ` , ` fld1 ` , ` cld ` , ` rem ` , ` mod ` , ` mod1 `
104
102
- ` divrem ` , ` fldmod ` , ` fldmod1 `
105
103
- ` - ` , ` + ` , ` * ` , ` ^ `
106
- - so does ` / ` , before converting to Float64
107
104
108
105
## Exported Types and Constructors / Converters
109
106
@@ -127,9 +124,9 @@ const SafeInteger = Union{SafeUnsigned, SafeSigned}
127
124
128
125
## Other Conversions
129
126
130
- ` Signed(x::SafeSigned) ` returns an signed integer of the same bitwidth as x
131
- ` Unsigned(x::SafeUnsigned) ` returns an unsigned integer of the same bitwidth as x
132
- ` Integer(x::SafeInteger) ` returns an Integer of the same bitwidth and either Signed or Unsigned as is x
127
+ ` Signed(x::SafeSigned) ` returns an signed built-in integer of the same bitwidth as x
128
+ ` Unsigned(x::SafeUnsigned) ` returns an unsigned built-in integer of the same bitwidth as x
129
+ ` Integer(x::SafeInteger) ` returns a built-in integer of the same bitwidth and either Signed or Unsigned as is x
133
130
134
131
` SafeSigned(x::Signed) ` returns a safe signed integer of the same bitwidth as x
135
132
` SafeUnsigned(x::Unsigned) ` returns a safe unsigned integer of the same bitwidth as x
0 commit comments