Re: Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation
As I look further, it appears that standard Python libs such as float or
decimal.Decimal do not provide exact representation of rational numbers
(fractions) without potential loss of precision. Seems ‘fraction’
package yield exact results because those functions directly work on
fractions (to my limited understanding).
decimal.Decimal is better than float, but it only extends to arbitrary
precision decimal arithmetic, not exact representation of rational
numbers. Given that these libraries could potentially serve as
dependencies for tensor-related packages and beyond, should we consider
bringing 'fraction' or restrict ourselves to float (which is a fallback
in moarchiving if fraction unavailable)?
I’m leaning towards fractions because it ensures exact fraction
representation without the issues of rounding in numbers. What do you
all think?
Cheers!
Reply to:
- Prev by Date:
Bug#1075926: ITP: asammdf -- GUI application used to analyse engine CAN logs
- Next by Date:
Re: Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation
- Previous by thread:
Re: Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation
- Next by thread:
Re: Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation
- Index(es):