NEST  2.6.0,not_revisioned_source_dir@0
Functions
numerics.cpp File Reference

Functions

long ld_round (double x)
 Round to nearest int, rounding midpoints upwards. More...
 
double dround (double x)
 Round to nearest int, rounding midpoints upwards. More...
 
double dtruncate (double x)
 Return integer part of argument. More...
 

Function Documentation

double dround ( double  )

Round to nearest int, rounding midpoints upwards.

Returns
Result as double
Note
[-1/2, 1/2) -> 0 and in general [ (2n-1)/2, (2n+1)/2 ) -> n
See also
ld_round

Referenced by nest::Time::set_resolution().

double dtruncate ( double  x)

Return integer part of argument.

long ld_round ( double  )

Round to nearest int, rounding midpoints upwards.

Returns
Result as long
Note
[-1/2, 1/2) -> 0 and in general [ (2n-1)/2, (2n+1)/2 ) -> n
See also
dround

Referenced by nest::Time::delay_ms_to_steps().