Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1203617
| From | Russ Allbery <rra@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.devel |
| Subject | Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation |
| Date | 2024-07-08 02:10 +0200 |
| Message-ID | <IXK77-zig-3@gated-at.bofh.it> (permalink) |
| References | <IXJNL-yWw-1@gated-at.bofh.it> <IXCjf-unZ-3@gated-at.bofh.it> <IXJNL-yWw-1@gated-at.bofh.it> |
| Organization | The Eyrie |
Cross-posted to 2 groups.
Yogeswaran Umasankar <yogu@debian.org> writes: > 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 think the suggestion is to use the Python standard library package "fractions" specifically: https://docs.python.org/3/library/fractions.html -- Russ Allbery (rra@debian.org) <https://www.eyrie.org/~eagle/>
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Yogeswaran Umasankar <yogu@debian.org> - 2024-07-07 17:50 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Daniele Nicolodi <daniele@grinta.net> - 2024-07-07 19:20 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Andrey Rakhmatullin <wrar@debian.org> - 2024-07-07 19:30 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Yogeswaran Umasankar <yogu@debian.org> - 2024-07-07 20:00 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Alexandre Detiste <alexandre.detiste@gmail.com> - 2024-07-07 20:10 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Andrey Rakhmatullin <wrar@debian.org> - 2024-07-07 22:00 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Colin Watson <cjwatson@debian.org> - 2024-07-08 16:40 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Yogeswaran Umasankar <yogu@debian.org> - 2024-07-08 02:20 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Russ Allbery <rra@debian.org> - 2024-07-08 02:10 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Yogeswaran Umasankar <yogu@debian.org> - 2024-07-08 02:00 +0200
Bug#1075905: ITP: python-fraction -- Fraction carries out all the fraction operations including addition, subtraction, multiplication, division, reciprocation Daniele Nicolodi <daniele@grinta.net> - 2024-07-08 02:10 +0200
csiph-web