@@ -328,7 +328,7 @@ you can use a `QuantityArray`:
328328
329329``` julia-repl
330330julia> ar = rand(3)u"m/s"
331- 3-element QuantityArray(::Vector{Float64}, ::Quantity{Float64, Dimensions{FixedRational{Int32, 25200} }}):
331+ 3-element QuantityArray(::Vector{Float64}, ::Quantity{Float64, Dimensions{FRInt32 }}):
332332 0.2729202669351497 m s⁻¹
333333 0.992546340360901 m s⁻¹
334334 0.16863543422972482 m s⁻¹
@@ -423,31 +423,32 @@ julia> total_cookies = cookie_rate * total_milk
42342392.7 cookies
424424```
425425
426- Exponents are tracked by default with the type ` R = FixedRational{Int32,C} ` ,
427- which represents rational numbers with a fixed denominator ` C ` .
426+ Exponents are tracked by default with the type ` FRInt32 ` (alias for ` FixedRational{Int32, 25200} ` ) ,
427+ which represents rational numbers with an integer numerator and fixed denominator.
428428This is much faster than ` Rational ` .
429429
430430``` julia
431431julia> typeof (0.5 u " kg" )
432- Quantity{Float64, Dimensions{FixedRational{Int32, 25200 } }}
432+ Quantity{Float64, Dimensions{FRInt32 }}
433433```
434434
435435You can change the type of the value field by initializing with a value
436436explicitly of the desired type.
437437
438438``` julia
439439julia> typeof (Quantity (Float16 (0.5 ), mass= 1 , length= 1 ))
440- Quantity{Float16, Dimensions{FixedRational{Int32, 25200 } }}
440+ Quantity{Float16, Dimensions{FRInt32 }}
441441```
442442
443443or by conversion:
444444
445445``` julia
446446julia> typeof (convert (Quantity{Float16}, 0.5 u " m/s" ))
447- Quantity{Float16, Dimensions{FixedRational{Int32, 25200 } }}
447+ Quantity{Float16, Dimensions{FRInt32 }}
448448```
449449
450- For many applications, ` FixedRational{Int8,6} ` will suffice,
450+ For many applications, using ` FRInt8 ` (alias for ` FixedRational{Int8,12} ` )
451+ will suffice as the base dimensions type,
451452and can be faster as it means the entire ` Dimensions `
452453struct will fit into 64 bits.
453454You can change the type of the dimensions field by passing
@@ -456,9 +457,9 @@ the type you wish to use as the second argument to `Quantity`:
456457``` julia
457458julia> using DynamicQuantities
458459
459- julia> R8 = Dimensions{FixedRational{Int8, 6 } };
460+ julia> R8 = Dimensions{FRInt8 };
460461
461- julia> R32 = Dimensions{FixedRational{Int32, 2 ^ 4 * 3 ^ 2 * 5 ^ 2 * 7 }}; # Default
462+ julia> R32 = Dimensions{FRInt32};
462463
463464julia> q8 = [Quantity {Float64,R8} (randn (), length= rand (- 2 : 2 )) for i in 1 : 1000 ];
464465
0 commit comments