Releases: rossellhayes/fracture
Releases · rossellhayes/fracture
Version 0.2.1
New features
fracture()
andfrac_mat()
no longer return an error when receiving a vector containingNA
orInf
values (#14).fracture(NA)
now returnsNA
.fracture(Inf)
now returns"Inf/1"
.
Bug fixes
- Fixed a bug where
frac_style()
would print integers in mixedfracture
s as"1 ⁰/₀"
instead of"1"
(#12).
fracture 0.2.0
Breaking changes
- The second argument to
fracture()
andfrac_mat()
is now...
, which must be empty. As a result, all arguments besidesx
must now be named. (#5) fracture()
andfrac_mat()
now default to a denominator of1
whenx
equals0
or1
. Previously, these would default to a denominator ofmax_denom
.max_denom
is still used as the denominator whenx
is0
or1
± ε. (#6)
New features
fracture()
andfrac_mat()
gain the argumentdenom
, which allows the user to set an explicit denominator used by all fractions. (#5)
Miscellaneous
Version 0.1.2
New features
- Added
frac_style()
which formats fractures using Unicode superscripts and subscripts. - Added
is.frac_mat()
which tests if a matrix is formatted like the output offrac_mat()
.
Bug fixes
- Fixed bug where certain fractions (e.g. 16/113,
frac_mat(1307.36, base_10 = TRUE)
) would cause an floating point rounding error.- Reimplemented
decimal_to_fraction_cont()
anddecimal_to_fraction_base_10()
withdouble
rather thanint
. - Added tests to cover all fractions below 1000/1000 (reduced to 100/100 when testing on CRAN), all base_10 fractions below 10,000/10,000 (100/100 on CRAN) and a random sample fractions below 10,000,000/10,000,000.
- Reimplemented
- Fixed bug with fracture math where only the first element would be returned.
- Added error handling for
NA
and infinite inputs tofrac_mat()
.
Documentation
- Added
pkgdown
site. frac_mat()
'smax_denom
should be less than the inverse square root of machine double epsilon.
Version 0.1.0
Initial CRAN release