[#BloombergLP-bdljsn-NumberUtil-asFloat]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/NumberUtil.adoc[NumberUtil]::asFloat
:relfileprefix: ../../../
:mrdocs:

Return the closest floating point representation to the specified `value`&period; If `value` is outside the representable range, return &plus;INF or &hyphen;INF (as appropriate)&period; The behavior is undefined unless `isValidNumber(value)` is `true`&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;numberutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
float
asFloat(std::string&lowbar;view const& value);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
