-] RangeLab 1.0

RangeLab is an openly distributed static analysis tool to automatically validate the accuracy of floating-point or fixed-point computations. Given intervals for the input variables, RangeLab computes the range of the outputs of simple functions with conditional or loops as well as ranges for the roundoff errors arising during these computations. Hence the users not only obtains the range of the result of the computation in the computer arithmetic but also a bound on the difference between the computer result and the result in infinite precision.

Documentation:

RangeLab User's Guide in html or pdf.

Installation instructions are here.

Download:

RangeLab is free software, distributed under the GNU General Public License.

rangelab.tar.gz

Contact:

Email: Matthieu Martel

 [ R A N G E . L A B ]

  Version 1.0

  July 2011


  RangeLab 1.0 Copyright (C) 2011  Matthieu Martel
  This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  This is free software, and you are welcome to redistribute it
  under certain conditions; type `show c' for details.

-] 0.1+0.2

ans = 
       float64: [2.999999999999999E-1,
                 3.000000000000001E-1]
         error: [-4.857225732735059E-17,
                 4.857225732735060E-17]

-] a=2*ans

a = 
     float64: [5.999999999999999E-1,6.000000000000001E-1]
       error: [-1.526556658859590E-16,1.526556658859591E-16]

-] trapeze(0.25,50,100)

ans = 
       float64: [6.557548333631875E1,1.311509666726376E2]
	         error: [-1.456853305716057E-12,1.457731336808933E-12]
	
-] 4.5

ans = 
       float64: 4.500000000000000E0
         error: 0.000000000000000E-1

-] 8.25#40

ans = 
       mp(40): 8.250000000000E0
        error: 0.000000000000000E-1

-] 10_75

ans = 
       fixed(4,2): 10_75
            error: 0.000000000000000E-1

-] [1 2;3 4]

ans = 
       int32[]: 1 2 
                3 4

-] 1.0/3.0

ans = 
       float64: 3.333333333333333E-1
         error: [1.850371707708594E-17,1.850371707708595E-17]

-] 1.0/5.0

ans = 
       float64: 2.000000000000000E-1
         error: [-1.110223024625156E-17,-1.110223024625157E-17]

-] 1.0/2.0

ans = 
       float64: 5.000000000000000E-1
         error: 0.000000000000000E-1

-] 1.0/10e8

ans = 
       float64: 1.000000000000000E-9
         error: [6.228159145777985E-17,6.228159145777986E-17]%

-] set absolute
-] 1.0/10e8

ans = 
       float64: 1.000000000000000E-9
         error: [-6.228159145777985E-26,-6.228159145777986E-26]

-] x=1.0/3.0

x = 
     float64: 3.333333333333333E-1
       error: [1.850371707708594E-17,1.850371707708595E-17]

-] y=1.0/7.0

y = 
     float64: 1.428571428571428E-1
       error: [7.930164461608261E-18,7.930164461608262E-18]

-] x+y

ans = 
       float64: 4.761904761904762E-1
         error: [2.643388153869420E-17,2.643388153869421E-17]

-] x-y

ans = 
       float64: 1.904761904761905E-1
         error: [1.057355261547768E-17,1.057355261547769E-17]

-] x*y

ans = 
       float64: 4.761904761904762E-2
         error: [2.643388153869420E-18,2.643388153869421E-18]

-] 0.1

ans = 
       float64: [9.999999999999999E-2,1.000000000000001E-1]
         error: [-6.938893903907228E-18,6.938893903907229E-18]

-] [-5,10]

ans = 
       int32: [-5,10]

-] [2.0,5.0]

ans = 
       float64: [2.000000000000000E0,5.000000000000000E0]
         error: 0.000000000000000E-1

-] [0.1,0.2]

ans = 
       float64: [9.999999999999999E-2,2.000000000000001E-1]
         error: 0.000000000000000E-1

-] [3,8]/[2,5]

ans = 
       int32: [0,4]

-] a=[-1.0,1.0]

a = 
     float64: [-1.000000000000000E0,1.000000000000000E0]
       error: 0.000000000000000E-1

-] a+a

ans = 
       float64: [-2.000000000000000E0,2.000000000000000E0]
         error: [-1.110223024625156E-16,1.110223024625157E-16]

-] a-a

ans = 
       float64: 0.000000000000000E-1
         error: 0.000000000000000E-1

-] a*a-2.0*a+1.0      

ans = 
       float64: [-1.000000000000000E0,4.000000000000000E0]
         error: [-5.551115123125782E-16,5.551115123125783E-16]

-] 66

ans = 
       int32: 66

-] int64(ans)

ans = 
       int64: 66

-] cast(ans,'int32')

ans = 
       int32: 66

-] set bin
-] 5506

ans = 
       int32: 00000000000000000001010110000010

-] int64(ans)

ans = 
       int64: 0000000000000000000000000000000000000000000000000001010110000010

-] -5506

ans = 
       int32: 10000000000000000001010110000010

-] set dec
-] ans

ans = 
       int64: 5506

-] x=0.1       

x = 
     float64: [9.999999999999999E-2,1.000000000000001E-1]
       error: [-6.938893903907228E-18,6.938893903907229E-18]

-] float32(x)

ans = 
       float32: [9.9999994E-2,1.0000001E-1]
         error: [-5.960464476151283E-9,1.490116120772545E-9]

-] cast(x,'float128')

ans = 
       float128: [9.999999999999999167332731531132594E-2,1.000000000000000055511151231257828E-1]
          error: [-6.938893903907228E-18,6.938893903907229E-18]

-] mp(12)(x)

ans = 
       mp(12): [9.997E-2,1.001E-1]
        error: [-2.441406249999861E-5,6.103515625001388E-6]

-] 0.1#113

ans = 
       float128: [9.999999999999999999999999999999999E-2,1.000000000000000000000000000000001E-1]
          error: [-6.018531076210112E-36,6.018531076210113E-36]

-] 0.1#250

ans = 
       mp(250): [1.000000000000000000000000000000000000188079096131566001274997845955559308450E-1,
                 1.000000000000000000000000000000000000188079096131566001274997845955559308451E-1]
         error: [-3.454467422037777E-77,3.454467422037778E-77]

-] 0.1#12

ans = 
       mp(12): [9.997E-2,1.001E-1]
        error: [-1.525878906250000E-5,1.525878906250000E-5]

-] set bin
-] -118.625

ans = 
       float64: 1 10000000101 1101101010000000000000000000000000000000000000000000
         error: 0.000000000000000E-1

-] float32(0.1)

ans = 
       float32: [0 01111011 10011001100110011001100,0 01111011 10011001100110011001101]
         error: [-5.960464476151283E-9,1.490116120772545E-9]

-] [0.1,0.2,-5e-5,5e-4]

ans = 
       float64: [9.999999999999999E-2,2.000000000000001E-1]
         error: [-5.000000000000000E-5,5.000000000000001E-4]

-] [0.1,0.1,0.0,0.0]

ans = 
       float64: [9.999999999999999E-2,1.000000000000001E-1]
         error: 0.000000000000000E-1

-] float32(3.2)+float64(6.4)

ans = 
       float64: [9.599999809265135E0,9.600000047683717E0]
         error: [-1.907348645691087E-7,4.768371719698906E-8]

-] float32(3.2)+float128(12.8)

ans = 
       float128: [1.599999980926513565293589635984972E1,1.600000004768371653085523576010019E1]
          error: [-1.907348641250194E-7,4.768371675289985E-8]

-] float64(6.4)+mp(16)(1.6)

ans = 
       float64: [7.999975585937499E0,8.000006103515626E0]
         error: [-2.441406250131006E-5,6.103515626354473E-6]

-] set bin
-] 4_75

ans = 
       fixed(3,2): 100_11
            error: 0.000000000000000E-1

-] 0_1

ans = 
       fixed(1,32): 0_0999999998603
             error: [0.000000000000000E-1,4.656612873077393E-10]

-] a=2_125

a = 
     fixed(2,3): 2_125
          error: 0.000000000000000E-1

-] b=8_5

b = 
     fixed(4,1): 8_5
          error: 0.000000000000000E-1

-] c=a+b

ans = 
       fixed(4,3): 10_625
            error: 0.000000000000000E-1

-] c+c

ans = 
       fixed(5,3): 21_25
            error: 0.000000000000000E-1

-] 1+1.0+1_0

ans = 
       fixed(2,1): 3_
            error: 0.000000000000000E-1

-] a=[0.1,0.2]

a = 
     float64: [9.999999999999999E-2,2.000000000000001E-1]
       error: [-1.387778780781445E-17,1.387778780781446E-17]

-] [a a a; a a a]

ans = 
       float64[]: [9.999999999999999E-2 9.999999999999999E-2 9.999999999999999E-2 
                   9.999999999999999E-2 9.999999999999999E-2 9.999999999999999E-2 
                  ,
                   2.000000000000001E-1 2.000000000000001E-1 2.000000000000001E-1 
                   2.000000000000001E-1 2.000000000000001E-1 2.000000000000001E-1 
                  ]
          Errors: [-1.387778780781445E-17 -1.387778780781445E-17 -1.387778780781445E-17 
                   -1.387778780781445E-17 -1.387778780781445E-17 -1.387778780781445E-17 
                  ,
                   1.387778780781446E-17 1.387778780781446E-17 1.387778780781446E-17 
                   1.387778780781446E-17 1.387778780781446E-17 1.387778780781446E-17 
                  ]

-] x=1.0/3.0

x = 
     float64: 3.333333333333333E-1
       error: [1.850371707708594E-17,1.850371707708595E-17]

-] [x x x]

ans = 
       float64[]: 3.333333333333333E-1 3.333333333333333E-1 3.333333333333333E-1 
                  
          Errors: [1.850371707708594E-17 1.850371707708594E-17 1.850371707708594E-17 
                  ,
                   1.850371707708595E-17 1.850371707708595E-17 1.850371707708595E-17 
                  ]

-] m(1,2:3)

ans = 
       float64[]: 6.983298051515964E-1 4.187619622237631E-1 
                  
          Errors: 0.000000000000000E-1 0.000000000000000E-1 
                  
-] m(1:2,2)=77

m = 
     float64[]: 8.256695256490975E-1 7.700000000000000E1 4.187619622237631E-1 
                3.639862792660326E-1 7.700000000000000E1 6.938722786960372E-1 
                
        Errors: 0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                
-] m(1:2,1:2)=m(1:2,2:3)

m = 
     float64[]: 7.700000000000000E1 4.187619622237631E-1 4.187619622237631E-1 
                7.700000000000000E1 6.938722786960372E-1 6.938722786960372E-1 
                
        Errors: 0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1

-] 2*eye(3)+ones(3)

ans = 
       float64[]: 3.000000000000000E0 1.000000000000000E0 1.000000000000000E0 
                  1.000000000000000E0 3.000000000000000E0 1.000000000000000E0 
                  1.000000000000000E0 1.000000000000000E0 3.000000000000000E0 
                  
          Errors: 0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                  0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                  0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                  

-] ans .* ans

ans = 
       float64[]: 9.000000000000000E0 1.000000000000000E0 1.000000000000000E0 
                  1.000000000000000E0 9.000000000000000E0 1.000000000000000E0 
                  1.000000000000000E0 1.000000000000000E0 9.000000000000000E0 
                  
          Errors: 0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                  0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1 
                  0.000000000000000E-1 0.000000000000000E-1 0.000000000000000E-1

-] [0.1 0.2 0.3]*[0.4;0.5;0.6]

!!! Scalar product computed using left associativity.
ans = 
       float64: [3.199999999999999E-1,3.200000000000001E-1]
         error: [-1.151856388048599E-16,1.151856388048600E-16]

-] m=ones(2)*6.6

m = 
     float64[]: [6.599999999999999E0 6.599999999999999E0 
                 6.599999999999999E0 6.599999999999999E0 
                ,
                 6.600000000000001E0 6.600000000000001E0 
                 6.600000000000001E0 6.600000000000001E0 
                ]
        Errors: [-8.881784197001252E-16 -8.881784197001252E-16 
                 -8.881784197001252E-16 -8.881784197001252E-16 
                ,
                 8.881784197001253E-16 8.881784197001253E-16 
                 8.881784197001253E-16 8.881784197001253E-16 
                ]

-] m*m

!!! Matrix product computed using left associativity.
ans = 
       float64[]: [8.711999999999999E1 8.711999999999999E1 
                   8.711999999999999E1 8.711999999999999E1 
                  ,
                   8.712000000000002E1 8.712000000000002E1 
                   8.712000000000002E1 8.712000000000002E1 
                  ]
          Errors: [-4.121147867408581E-14 -4.121147867408581E-14 
                   -4.121147867408581E-14 -4.121147867408581E-14 
                  ,
                   4.121147867408582E-14 4.121147867408582E-14 
                   4.121147867408582E-14 4.121147867408582E-14 
                  ]

-] x=[1,10]

x = 
     int32: [1,10]

-] if x<5, a=x else b=x end
-] a

ans = 
       int32: [1,4]

-] b

ans = 
       int32: [5,10]

-] x

ans = 
	   int32: [1,10]
	
-] a=0; x=0;
-] while a<10, a=a+1; x=a end
-] a

ans = 
       int32: 10

-] x

ans = 
       int32: [1,10]

-] x=1.0;
-] while x<1000.0, x=x*[1.2,1.3] end
-] x

ans = 
       float64: [1.000000000000000E3,+oo]
         error: [-oo,+oo]

-] x=0.0; i=0;  
-] while i<1000, i=i+1; x=x+0.1 end
-] x

ans = 
       float64: [9.999999999999999E-2,+oo]
         error: [-oo,+oo]

-] set unroll 20
-] i=0; n=10; x=1.0; k=[0.8,0.9];                           
-] while i