lsst.sphgeom g8f490195a6+663e2227e0
Loading...
Searching...
No Matches
floatFormat.cc File Reference

This file contains the shortest round-trip double formatter. More...

#include "lsst/sphgeom/floatFormat.h"
#include <cmath>
#include <cstdio>
#include <cstdlib>

Namespaces

namespace  lsst::sphgeom

Functions

void lsst::sphgeom::detail::appendShortestDoubleFallback (std::string &out, double value)
void lsst::sphgeom::appendShortestDouble (std::string &out, double value)

Detailed Description

This file contains the shortest round-trip double formatter.

Function Documentation

◆ appendShortestDoubleFallback()

void lsst::sphgeom::detail::appendShortestDoubleFallback ( std::string & out,
double value )

appendShortestDoubleFallback is the implementation of appendShortestDouble used where SPHGEOM_HAVE_FP_TO_CHARS is 0.

It is compiled unconditionally so that the unit tests exercise it, and check it against std::to_chars, on every platform. Both it and the SPHGEOM_HAVE_FP_TO_CHARS switch can be deleted once no supported build targets a macOS older than 13.3.