项目作者: olyutorskii

项目描述 :
DoubDabC is a Java library that supports binary integer value to decimal sequence conversion with alternative algorithm.
高级语言: Java
项目地址: git://github.com/olyutorskii/DoubDabC.git
创建时间: 2017-01-02T06:48:09Z
项目社区:https://github.com/olyutorskii/DoubDabC

开源协议:MIT License

下载


DoubDabC

Java CI with Maven
CodeQL


What is DoubDabC ?

  • DoubDabC is a Java library
    that supports binary integer value to decimal sequence conversion
    with alternative algorithm.

  • Yes, it will substitute implementations such as
    Integer.toString(int) and so on.

DoubDabC implementation

  • DoubDabC implements Double-Dabble algorithm
    aka Shift-and-add-3.
    Double-Dabble is a radix-conversion algorithm
    but there is no division(/) nor remainder(%) operation.
    It’s a bit fast.

  • There is no String constructor during conversion.
    That means, GC-friendry !

Supported Input

  • DoubDabC has a pseudo register of the size you specified.
    You can put N-bit bool, int, long, BitSet, or BigInteger
    as binary integer value.

  • Let’s try to put a huge Mersenne prime like 2^32582657 -1.
    Overflow ? OK, don’t worry.
    Just losing higher decimals over you specified.

Supported Output

  • You can get each decimal number column result by int or int[] array.

  • You can assign
    Appendable, Writer, StringBuffer, StringBuilder, or CharBuffer
    as Arabic numeral characters(0-9) sequence output.

  • CharSequence wrapper class is provided.

Limitations

  • DoubDabC does not support negative values.
    Signed-values are treated as Unsigned-value
    like Integer.toUnsignedString(int).
    Let’s convert absolute value that follows minus(-) sign.

What is the difference with JarabraDix ?

  • If you use binary integer value that fit in ‘long’ or ‘int’,
    and you have modern JVM and CPU that supports fast integer division,
    let’s try JarabraDix.

How to build

  • DoubDabC needs to use Maven 3.3.9+
    and JDK 1.8+ to be built.

  • DoubDabC runtime does not depend on any other library at all.
    Just compile Java sources under src/main/java/ if you don’t use Maven.

License

Project founder

Key technology

—- EOF —-