Closed Ihromant closed 8 months ago
This just means that it's (I'm not saying impossible) complicated and unneeded to spend efforts to improve custom self-written algorithm.
No, I can't agree. At least, after all my efforts I can't let you throw away my almost perfectly working code.
It's better to reuse common knowledge shared under Open-Source-friendly license.
Yes, and get the code that neither you, nor I understand. And moreover, you need to somehow port it from C++.
Sure, it should be tested well, basic question is unanswered: whether continue working on this PR or just drop it
In this form drop it. You can take some tests from Harmony/Android implementation to find issues in current implementation, as well as fix these errors in current code. You can read some papers about decimal-to-binary conversion to improve accuracy and fix current algorithm. But in this current it's almost impossible to review.
Hi @konsoletyper . This is initial (and therefore unfinished) implementation for Double.parseDouble improvement. Code was borrowed from https://android.googlesource.com/platform/libcore/+/d5e2817/luni/src/main/java/java/lang/Double.java Android source repository (Apache 2.0). Test was borrowed from there as well. So, test shows that we have issues in Double.toHexString (suppose will be fixed separately) and with parsing. I reused implementation and replaced native implementation to the most naїve approach instead of real implementation (should be transformed from C++ https://cs.android.com/android/platform/superproject/+/master:libcore/luni/src/main/native/java_lang_StringToReal.cpp;l=92;drc=master ). Is it worth continuing working on this PR or stop here? It appears that even naїve implementation covers most of the tests that currently present.