Project

General

Profile

Bug #9490

Postgres backend can throw exception when getting subnormal floats out of the database

Added by Roel Standaert 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
12/14/2021
Due date:
% Done:

100%

Estimated time:

Description

When we retrieve a float it uses std::stof, which may throw std::out_of_range when a subnormal float is stored in the database.

E.g. storing and retrieving the following number causes an exception:

std::nextafter(0.f, std::numeric_limits<float>::infinity())

Also available in: Atom PDF