You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,36 @@
7
7
Finally a number type that you can count with your fingers. Super Mario and Zelda would be proud.
8
8
9
9
Comes in two flavours: `Float8` has 3 exponent bits and 4 fraction bits, `Float8_4` has 4 exponent bits and 3 fraction bits.
10
-
Both rely on conversion to Float32 to perform any arithmetic operation.
10
+
Both rely on conversion to Float32 to perform any arithmetic operation, similar to `Float16`.
11
+
12
+
# Example use
13
+
14
+
```julia
15
+
julia>using.Float8s
16
+
17
+
julia> a =Float8(4)
18
+
Float8(0x50)
19
+
20
+
julia> b =Float8(2)
21
+
Float8(0x40)
22
+
23
+
julia> a+b
24
+
Float8(0x58)
25
+
26
+
julia>Float32(a+b)
27
+
6.0f0
28
+
29
+
julia>Float32(sqrt(a))
30
+
2.0f0
31
+
```
32
+
Most arithmetic operations are implemented. If you would like to have an additional feature, raise an [issue](https://github.com/milankl/Float8s.jl/issues).
33
+
34
+
# Installation
35
+
36
+
`Float8s.jl` is not yet registered, for the time being do
0 commit comments