Replies: 5 comments 12 replies
-
The README is very well-written an informative. I would add also the main motivation for Quadruple: that it's much faster than BigDecimal, which makes it much more useful for resource-intensive scientific computing and simulations. This could be phrased as a separate paragraph under a separate ##heading and include a chart demonstrating the performance of Quadruple vs. BigDecimal on some common floating-point computing benchmark. |
Beta Was this translation helpful? Give feedback.
-
Are these packages included in Java SE 15 JDK? import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable; In order to get the imports in IntelliJ, I had to do this instead: import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
//import com.sun.istack.internal.NotNull;
//import com.sun.istack.internal.Nullable; And I had to add the corresponding dependency to Maven: <dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
|
Beta Was this translation helpful? Give feedback.
-
Here is some (quite old) code to test performance against in the future, aside from the BigInteger implementations of various vendors: |
Beta Was this translation helpful? Give feedback.
-
From the perspective of style, the code looks very good already. There are a few minor improvements that I think can be made, but I will add more comments as a reply to this thread if I see more issues. Removing dead code.
Removing abbreviations from method & variable namesAbbreviations typically shouldn't be used in method / class / variable names, since they tend to be ambiguous. Moreover, it is harder for the coder to remember which version of an annotation was used than to remember the whole word, e.g. Luckily, refactoring features in
NB: These are only some examples I found. If you find more abbreviations (except "min" and "max"), they should probably be changed to full words as well.
For instance, this comment: Quadruple/src/com/mvohm/quadruple/Quadruple.java Lines 4920 to 4921 in 068dabf Would be changed to: /** Compare two numbers
* represented as arrays of {@code long} (big-endian, most significant bits in buff[0]) This is a tricky issue: it is among the newer standards to be adapted, and a lot of old (and good) code out there uses alternative strategies. However, it is something to consider. Here is more information on the topic: https://stackoverflow.com/a/61624638/844728 [EDIT] Java API seems to use the indicative mood, which is what you have. I suppose it is better to stay consistent, so I withdraw the above proposal about imperative mood. |
Beta Was this translation helpful? Give feedback.
-
I'll start a new thread here on the topic of documentation and code comments.
I would need to start using the library to be better qualified to say this, but this is how I feel just by reading it. Some of the comments for private methods may be improved grammatically and from a lexical perspective, but that hardly seems worth investing a dedicated effort. Perhaps, just keep improving bit-by-bit as you maintain the library in the comping years? |
Beta Was this translation helpful? Give feedback.
-
I will appreciate any comments on the project.
Any questions are welcome.
JavaDoc as separate HTML files and a more informative README are coming soon.
Beta Was this translation helpful? Give feedback.
All reactions