To whom it may concern, About “Add support for extended precision floating-point numbers” project of Google Summer of Code 2023.
My name is Sentaro Onizuka. I emailed several days ago about my interest in this project and received the details and related resources. And I read the resources provided and would like to discuss the projects. Here is what I understood based on the resource ・ I understood how the user-friendly API is implemented by looking at what is already implemented in the Commons project (especially the Sum class that uses the builder pattern). ・ I read David Bailey's paper on the QD library and understood its algorithms. I also briefly looked over its C++ implementation. ・ I read the DD class[2] and understood the double-double implementation and API. What I would like to discuss is the API for a double-double. In particular, how I can extend it to a more user-friendly API. I have two ideas on this. ・ In the DD class API, simplify adding multiple DD values. e.g., compute the sum a1 + a2 + a3 (ai = {ai_h, ai_l}, ai == ai_h + ai_l) In the current DD class DD dd = DD.create(a1[0], a1[1]); dd = DD.add(dd.hi(),dd.lo(), a2[0], a2[1], dd); dd = DD.add(dd.hi(),dd.lo(), a3[0], a3[1], dd); double result = dd.doubleValue(); In contrast, we implement the varargs factory method, which allows writing the following. double a = {a1, a2, a3}; double result = DD.of(a).doubleValue(); The implementation is assumed to be as follows, referring to the Sum class. public static DD of(double[][] values){ return create().add(values); } public DD add(final double[][] terms) { for (double[] t : terms) { assert i.length == 2 : “ERROR”; add(t[0], t[1]); } return this; } public DD add(double x, double xx){ // Adds a single term to this DD. return this; } ・ Implement QD as well as DD. As briefly mentioned in the David Bailey paper, for many applications, the use of DD or QD is sufficient. Therefore, I do not think implementing arbitrary-length floating-point numbers is necessary. And my question is, what specific extensions do you think are needed regarding the existing double-double API? Also, how about my ideas on extending the API to be more user-friendly? Am I on the right way? Regards, Sentaro Onizuka [1] commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Sum.java [2] commons-statistics-inference/src/main/java/org/apache/commons/statistics/inference/DD.java --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org