Giter Site home page Giter Site logo

COJAC - Boosting arithmetic capabilities of Java numbers

Java numbers with a fresh eye and a cool tool...

... Don't miss the opportunity:

Numerical Sniffer, and other floating point gadgets

  • Automatic detection of all those poisonous problems with numbers, such as:

    • integer overflow
    • absorption and cancellation with float/double
    • NaN or Infinite results
    • offending type casting
  • New behaviors for floating point numbers, such as doubles-are-floats, or redefinition of the default rounding mode.

  • No recompilation needed, easy to use (java -javaagent:cojac.jar ...)

Enriching Wrapper

  • Automatic replacement of every float/double with more powerful number types, such as:

    • high precision numbers: you choose the number of significant digits for the standard float/double types! What a super-power for a runtime flag!
    • interval computation, to keep rounding errors under control and signal when it grows too much. Again, without any source code modification!
    • automatic differentiation, to bring you (for free!) the derivative of any encoded function. No other port of AutoDiff is that elegant!
    • symbolic processing, and even Chebfun-like representation
  • No recompilation needed, easy to use (you want 100 significant digits? java -javaagent:cojac.jar="-Rb 100" ...)

Recent improvements

The following features have been implemented and recently included in the current release:

  • symbolic expressions: we rebuild the formulas from the bytecode, and then apply simplification rules, just like Mathematica and similar great tools are able to do. Hard to believe, but yes we did it!

  • symbolic functions: a step further, where you can tag a number as being the unknown.

  • Chebfun representation: a completely different way to represent symbolic functions, with a good compromise of accuracy/efficiency (see Matlab's Chebfun). But here completely transparently: with COJAC the same computation code can be run numerically, symbolically, or as Chebfuns.

  • a couple of well-known debugging tools useful to track possible instabilities: forcing doubles to act like floats, changing the rounding mode, negating the comparisons when the numbers are too close together.

  • a Delta-Debugging infrastructure for the debugging features above, so that you can automatically find the portion of code that causes the instabilities.


Developed at the School of Engineering of Fribourg, Switzerland.

Distributed under the "Apache License, v2.0".

cojac's Projects

cojac icon cojac

Numerical sniffing tool and Enriching number wrapper for Java

cojac-grind icon cojac-grind

Cojac-grind = Prototype of a numerical problem sniffer based on Valgrind

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.