Releases: wrandelshofer/FastDoubleParser
Release 2.0.1 with fixes for ConfigurableDoubleParser
This release fixes the following issues with ConfigurableDoubleParser:
-
ConfigurableDoubleParser could not parse a number if both the exponent separator and infinity or NaN started with the same character.
-
ConfigurableDoubleParser could not parse a number if one of the NumberFormatSymbols was a Unicode 'format character'.
Release 2.0.0 with ConfigurableDoubleParser
The Release 2.0.0 adds a ConfigurableDoubleParser to the library.
The ConfigurableDoubleParser supports parsing of double numbers in localed formats, similar to java.text.DecimalFormat.
Examples:
var symbols = NumberFormatSymbols.fromDecimalFormatSymbols(new DecimalFormatSymbols(Locale.GERMAN));
boolean ignoreCase = true;
var confdParser = new ConfigurableDoubleParser(symbols, ignoreCase);
double confD1 = confdParser.parseDouble("123.456,89e5");
double confD2 = confdParser.parseDouble("-0.15425,89E-5");
System.out.println("Double value in German Locale: " + confD1);
System.out.println("Another double value in German Locale: " + confD2);
symbols = NumberFormatSymbols.fromDecimalFormatSymbols(new DecimalFormatSymbols(Locale.forLanguageTag("zh-CN")));
symbols = symbols
.withDigits(List.of('〇', '一', '二', '三', '四', '五', '六', '七', '八', '九'))
.withExponentSeparator((Set.of("*一〇^")));
confdParser = new ConfigurableDoubleParser(symbols, ignoreCase);
double confZh = confdParser.parseDouble("四一.五七五三七一六六二一四五九八*一〇^七");
System.out.println("Double value in Chinese Locale: " + confZh);
Workaround for Zing JVM
This release contains a workaround for the Zing JVM.
OpenJDK Runtime Environment Zing24.09.0.0+5 (build 21.0.4+4-LTS)
Zing 64-Bit Tiered VM Zing24.09.0.0+5 (build 21.0.4-zing_24.09.0.0-b5-release-linux-X86_64, mixed mode)
Instead of calling {@link Math#unsignedMultiplyHigh(long, long)}
we use our own implementation.
This version will perform slightly slower than the v1.0.1 release.
The JIT should generate a single MUL
instruction for Math#unsignedMultiplyHigh(long, long)
.
This workaround consists of 6 lines of Java code that simulates this instruction.
Snapshot 2024-10-20_114324cc
This release adds support for parsing byte arrays to ConfigurableDoubleParser.
The NumberFormatSymbols allow now to specify a list of digits instead of a single zero digit char.
Snapshot 2024-10-13_199e49bf
This snapshot release contains the following fixes and enhancements for class ConfigurableDoubleParser:
- Add the boolean parameter "ignoreCase" to the constructor.
- Fix parsing of sign characters.
- Fix parsing of exponent separators that contain digit characters (for example "×10^").
Snapshot 2024-10-13_c95fc915
This snapshot release adds a tentative ConfigurableDoubleParser.
Fix issue with large array size inputs for JavaBigDecimalParser.parseBigDecimal
What's Changed
- Fix issue #80: Bug in large array size inputs for JavaBigDecimalParse… by @wrandelshofer in #81
Changelog
Full Changelog: v1.0.0...v1.0.1
Fix NPE in BigDecimalParser and improve Performance
Summary:
This release fixes a NullPointerException and provides new optimised versions of the Double, Float, BigDecimal and BigInteger parsers for Java 21, and 22.
Fixes:
This release includes the following fixes:
- Issue #78: Fixes a NullPointerException which can occur whan parsing a BigDecimal number with 400 digits or more.
Changes:
This release also includes the following changes:
- On Java 22 and higher: Use the Foreign Function & Memory API for reading multiple digits at once from char arrays.
- On Java 21: Use Long.compress() for parsing digits in char arrays.
- On Java 19 and Java 20: Drop the optimisations for these JVMs. Please upgrade to Java 21.
Includes required notice- and license-files in Jar files
Starting from this release we include the required notice- and license-files in the Jar files.
This way, you automatically fulfill all licensing requirement when using a Jar file from this project.
Reduces size of jar file and improves performance
This release reduces the size of the jar file and (very slightly) improves the performance of the parsers.