Skip to content

Standardise NaN / infinity syntax #3192

@Lestropie

Description

@Lestropie

I see three different usages:

  • Explicitly using std::numericl_limits<type>::quiet_NaN()

  • "NaN" appears to link to MR::NaN in core/types.h, and is explicitly of default_type, ie. double-precision

  • "NAN" for me claims to link to <math.h>:

    # if __GNUC_PREREQ (3, 3)
    #  define NAN (__builtin_nanf (""))
    

    , which seems to be single-precision

Would be better to be consistent.


  • Choose which syntax we want to standardise

    • Always use std::numeric_limits?
    • Permit NaN but preclude NAN?
  • Augment check_syntax to check for non-conformant usage

  • Modify code base to conform

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions