LogicBlox 4.3.8

Release Date: March 4th 2016

What's New

  • In LogicBlox 4.3.7 and earlier the fixed-point decimal type supported numbers in the range of -10^14 to 10^14 and the precision of the fraction was 0.00001 (10^-5). The limited range and precision was increasingly becoming a problem, for example in banking applications with different currencies, and in planning applications big spreading operations lacked the required precision. To address these problems, LogicBlox 4.3.8 introduces a revised fixed-point decimal type that supports a range of -10^18 to 10^18 and a fractional precision of 10^-18. Internally, decimal values can now use up to 128 bits, but are stored in a compressed format that will often limit the disk usage growth when upgrading applications to LogicBlox 4.3.8. In benchmarking of the new implementation, the performance impact has been limited to single-digit percentages.

  • The changes in the decimal type can potentially break some applications due to the increased precision or small differences we had to make in the implementation of built-ins. An overview of issues you may encounter:

    • In general, the much improved precision most likely causes different values to be computed for any non-trivial application. This may require updating expected test results. While reviewing the test changes needed, we advise adjusting tests to compare expected results only up to a certain precision.

    • decimal:string:convert used to pad the fraction with zeros to five digits (e.g. 1 would be rendered as 1.00000.) This is impractical with a precision of 18 digits, so the new implementation only prints the fractional digits up to the last non-zero digit.

    • When converting binary floating-point values (float) to decimal fixed-point values, the earlier versions of LogicBox 4.x would round the floating-point number to 5 digits due to limited precision of the decimal type. With the increased precision of decimal values in LB 4.3.8 binary floating-point number representation artifacts are now more visible.

      Example 28. 

      For example, float:decimal:convert[123.345f] now results in the decimal value 123.344999999999998863.


      We recommend consistent usage of either binary floating-point numbers or decimal fixed-point values, depending on the implementation.

    • The previous implementation for parsing strings to decimal values (string:decimal:convert) carefully rounded the input if the fraction in the string had more than 5 digits. In LB 4.3.8 the string value is truncated at 18 digits.

    • The representation of decimal values in the protocol for communication with the lb-server has changed. The decimal_column field is gone and has been replaced with a decimal128_column field. Also, the DecimalColumn is now called Decimal128Column, and it has different fields for the actual values. The Java library for communicating with the lb-server only required internal changes (not interface changes) because it already used BigDecimal (which can represent LogicBlox 128-bit decimal values). The Python library did not hide the internal decimal representation details and users of this library might have to make changes to their code. Because neither the Python or Java library is a formal interface with public documentation we hope that no users have code that is impacted. Please just reach out to us if you have problems upgrading client code.

  • New features for the decimal type:

    • The built-in decimal:int:convert has been reintroduced. It drops the fraction of the input decimal value.

      Example 29. 

      decimal:int:convert[13.8] results in 13, decimal:int:convert[-5.9] in -5.

    • We have extended the decimal rounding built-ins to support more tie-breaking policies. In LB 4.3.7 we only supported round (which rounds half to even) and roundHalfUp. We now support roundHalfAwayFromZero, roundHalfDown, roundHalfToEven, roundHalfToOdd, roundHalfTowardZero, and roundHalfUp. The simple round built-in still defaults to half-to-even. All rounding built-ins come in roundX and roundX2 variants that support rounding the fraction at the n’th digit.

    • The round2 built-in now also supports negative numbers, which rounds the decimal value all the way into the integral part of the number.

      Example 30. 

      round2[n, -2] with -2 rounds the value n to a multiple of hundred.


    Please refer to the LogicBlox Reference Manual for a complete overview of all the built-in predicates.

Installation and Upgrade information

Installation Instructions

Installing LogicBlox 4.3.8 is as simple as following the steps outlined below:

  1. Download the installation package.
  2. Extract the tarball in <YourPreferredInstallDirectory>
  3. Run the following command:
    source <YourPreferredInstallDirectory>/logicblox-4.3.8/etc/profile.d/logicblox.sh
    NOTE: this script will set all the necessary environment variables. You might want to add this command to your .bashrc.

Release Information

Server requirements
Operating System: 64 bit Linux; OSX 10.10+ is supported for local development.
Java Runtime Environment 7, update 11 or higher
Python 2.7 or higher
CPU compatible with the corei7 architecture
Client requirements
Applications using modeler-js User Interface Components: Google Chrome
Requirements for applications using non-modeler-js components may vary per application.