Skip to content

Releases: wrandelshofer/FastDoubleParser

Release 2.0.1 with fixes for ConfigurableDoubleParser

10 Nov 15:57
Compare
Choose a tag to compare

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

25 Oct 10:19
Compare
Choose a tag to compare

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

25 Oct 10:13
Compare
Choose a tag to compare

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

20 Oct 14:46
Compare
Choose a tag to compare
Pre-release

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

15 Oct 17:54
Compare
Choose a tag to compare
Pre-release

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

15 Oct 12:13
Compare
Choose a tag to compare
Pre-release

This snapshot release adds a tentative ConfigurableDoubleParser.

Fix issue with large array size inputs for JavaBigDecimalParser.parseBigDecimal

13 Sep 13:08
Compare
Choose a tag to compare

What's Changed

Changelog

Full Changelog: v1.0.0...v1.0.1

Fix NPE in BigDecimalParser and improve Performance

10 Dec 19:30
Compare
Choose a tag to compare

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

30 Apr 05:18
Compare
Choose a tag to compare

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

04 Mar 15:42
Compare
Choose a tag to compare

This release reduces the size of the jar file and (very slightly) improves the performance of the parsers.