Skip to content

Support NaN and ±Infinity for C++ ⇔GeoJSON synthetics #979

@nyurik

Description

@nyurik

In order to have comprehensive testing, we must ensure every possible value we support is readable in every implementation. GeoJSON does not support non-numeric floats, which means we should serialize it as strings to make sure we are consistent in every language. I used Rust names for the values, I hope we don't start a holy naming war here :). f32 and f64 are needed to be explicit about the originating data type.

Requirements

  • Serialize f32::NAN"f32::NAN"
  • Serialize f32::INFINITY"f32::INFINITY"
  • Serialize f32::NEG_INFINITY"f32::NEG_INFINITY"
  • Serialize f64::NAN"f64::NAN"
  • Serialize f64::INFINITY"f64::INFINITY"
  • Serialize f64::NEG_INFINITY"f64::NEG_INFINITY"

@TimSylvester

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions