Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## tesl
Class RoundDouble

    java.lang.Object
      tesl.RoundDouble

All Implemented Interfaces:
  TagCalculus<java.lang.Double>

    public class RoundDouble

extends java.lang.Object
implements TagCalculus<java.lang.Double>

A tag calculus on doubles which keeps only the 6 first digits after the decimal point and rounds to the nearest value, or down if there is no nearest value.

Author:
  boulange

Field Summary
`private static int` | `num_digits_`
`private static java.math.RoundingMode` | `rounding_mode_`

Constructor Summary
`RoundDouble()`

Method Summary
`java.lang.Double` | `add(java.lang.Double a, java.lang.Double b)`
`java.lang.Double` | `divide(java.lang.Double a, java.lang.Double b)`
`static java.lang.Double` | `do_add(java.lang.Double a, java.lang.Double b)`
`static java.lang.Double` | `do_divide(java.lang.Double a, java.lang.Double b)`
`static java.lang.Double` | `do_multiply(java.lang.Double a, java.lang.Double b)`
`static java.lang.Double` | `do_subtract(java.lang.Double a, java.lang.Double b)`
`java.lang.Double` | `multiply(java.lang.Double a, java.lang.Double b)`
`java.lang.Double` | `subtract(java.lang.Double a, java.lang.Double b)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### num_digits_

    private static final int num_digits_

See Also:
  Constant Field Values

### rounding_mode_

    private static final java.math.RoundingMode rounding_mode_

Constructor Detail

### RoundDouble

    public RoundDouble()

Method Detail

### add

    public java.lang.Double add(java.lang.Double a,
                                java.lang.Double b)

  Specified by:
    `add` in interface `TagCalculus<java.lang.Double>`

### do_add

    public static java.lang.Double do_add(java.lang.Double a,
                                          java.lang.Double b)

### subtract

    public java.lang.Double subtract(java.lang.Double a,
                                     java.lang.Double b)

  Specified by:
    `subtract` in interface `TagCalculus<java.lang.Double>`

### do_subtract

    public static java.lang.Double do_subtract(java.lang.Double a,
                                               java.lang.Double b)

### multiply

    public java.lang.Double multiply(java.lang.Double a,
                                     java.lang.Double b)

  Specified by:
    `multiply` in interface `TagCalculus<java.lang.Double>`

### do_multiply

    public static java.lang.Double do_multiply(java.lang.Double a,
                                               java.lang.Double b)

### divide

    public java.lang.Double divide(java.lang.Double a,
                                   java.lang.Double b)

  Specified by:
    `divide` in interface `TagCalculus<java.lang.Double>`

### do_divide

    public static java.lang.Double do_divide(java.lang.Double a,
                                             java.lang.Double b)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD