Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-734

Safely round a floating point number to the nearest integer (Get a stable and portable result when rounding)

    XMLWordPrintable

Details

    Description

      TODO:

      • Review floating point (sampling and integration periods) to integers(steps and shapes) roundings across simulator components and analyzers.
      • Enforce signal periods to be an integral multiple of the integration time step at one place and remove roundings which are only defined in one script (it's offset and error prone)
      • Deal with near half integers exceptions, which are the natural points of discontinuity of the nearest integer function.
      • Working with powers of 2 seems the natural solution to avoid this floating point issues, and it's currently the way the default simulation parameters are set/ meant to be used.

      Read: http://mathworld.wolfram.com/NearestIntegerFunction.html

      Gliffy Diagrams

        Attachments

          Activity

            People

              paula.sanz-leon Paula Sanz Leon
              tester TVB Testing environment (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 days, 2 hours
                  2d 2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours Time Not Required
                  2h