"truncation towards zero" could be "truncation"
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
For integral operands, the \tcode{/} operator yields the algebraic quotient with
any fractional part discarded;
\begin{footnote}
This is often called truncation towards zero.
\end{footnote}
- The "towards zero" part appears to be redundant
Here are some variants of the description of truncation, one can encounter on the internet:
- In simplest terms, truncation means to chop off the decimal portion of a number
- truncation is limiting the number of digits right of the decimal point
- To truncate a number, we miss off digits past a certain point in the number, filling-in zeros if necessary
They were picked exactly because they are different: one strictly happens to the entire fractional part, the second one happens somewhere in the fractional part, and the third one happens anywhere. Thus they allow production of different results, but what is still common in all of them is the act of replacing a part of the numeral notation (say, decimal notation) of a number with zero digits. The altered part is potentially infinitely long, but that does not even matter here: replacing a single non-zero digit with a zero brings a number closer to zero.
Besides being redundant, "towards zero" here subtly suggests that it is a choice, there are truncation operations that behave otherwise. This does not seem to be the case.
- "often" may not be true
If we accept that the number of hits in internet search engines do represent the frequency of usage of an expression to some extent, a couple hundred thousands hits for "truncation towards zero" does not feel "often" when compared to 100+ million hits discussing number truncation, presumably also bringing their result closer to zero.
This is only a guess, but it seems like the footnote may have talked about rounding at some point in the past, and then truncation got thrown in. Because rounding really offers choices, when to round "up" or "down", like the error-minimizing "half" roundings, round() functions usually implement the "half-up" flavour, but there are many more, then one can decide to round always towards positive infinity (ceil()), always towards negative infinity (floor()), and it is also possible to apply ceil() or floor() only to the magnitude of the number, where the latter one is indeed often called rounding towards zero, or truncation.
However, if "truncation towards zero" should be the correct expression, please consider adding where it comes from, because in 2024 it is not obvious.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the footnote in source/expressions.tex near line 6233 and review the surrounding wording and terminology. Check the issue's question about “truncation towards zero” and “often”; done means the footnote wording is resolved and updated consistently in that source file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tex
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100