You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2023/07/13 19:34:00 UTC
[jira] [Commented] (NUMBERS-198) New function - reverse the digits of a number
[ https://issues.apache.org/jira/browse/NUMBERS-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742934#comment-17742934 ]
Gilles Sadowski commented on NUMBERS-198:
-----------------------------------------
[~dimitrios.efthymiou],
How about taking it from the other end?
Rather than try and find a "small feature" (if it were in scope, how likely that it had not been implemented yet?), you could
* start a discussion about a missing functionality (e.g. "special" functions)
* select some bugs to fix (plenty on JIRA)
* take on some identified need (e.g. refactor the "clustering" package)
> New function - reverse the digits of a number
> ---------------------------------------------
>
> Key: NUMBERS-198
> URL: https://issues.apache.org/jira/browse/NUMBERS-198
> Project: Commons Numbers
> Issue Type: New Feature
> Components: core
> Reporter: Dimitrios Efthymiou
> Priority: Minor
> Labels: features
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I propose a new function for ArithmeticUtils that takes a number and it returns the number with the reversed digits. Some use cases are:
> # *Palindrome Checking:* The algorithm can be used as a part of a function to check if a number is a palindrome (a number that remains the same when its digits are reversed).
> # *Data Manipulation:* This algorithm could be used in a data manipulation or data cleaning process. For instance, in a situation where the digit order of numerical data has been systematically recorded incorrectly, this algorithm could be used to correct the data.
> # *User Interface (UI) Design:* In cases where the presentation of numbers needs to be manipulated for display purposes, this could be useful. For instance, if a UI design decision prefers displaying digits in a reverse order.
> # *Digital Signal Processing:* The bit-reversal operation is a crucial part of certain algorithms, such as the Fast Fourier Transform (FFT). Although the current method works with integers, a similar algorithm could be used for bit-reversal operations.
> # *Cryptographic or Security Methods:* This method might be used as part of a larger algorithm in cryptography or security. However, this by itself does not provide any significant security benefits.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)