digitalmars.D.learn - float/double to string (pure nothrow nogc)
- vit (2/2) Aug 08 2018 Hello, is in phobos some function which convert float/double to
- Steven Schveighoffer (3/7) Aug 08 2018 Not one that I can see. formattedWrite doesn't seem to be pure.
- ketmar (4/6) Aug 08 2018 i don't think that you can make it `pure`, but you certainly can make it...
- vit (3/10) Aug 08 2018 thanks, that code can be modified to pure nothrow @nogc @safe.
- ketmar (4/6) Aug 08 2018 converting float to string is a *very* complicated task. that lib is qui...
- Paul Backus (3/5) Aug 08 2018 Short answer: no.
Hello, is in phobos some function which convert float/double to string and is pure nogc and nothrow?
Aug 08 2018
On 8/8/18 1:08 PM, vit wrote:Hello, is in phobos some function which convert float/double to string and is pure nogc and nothrow?Not one that I can see. formattedWrite doesn't seem to be pure. -Steve
Aug 08 2018
vit wrote:Hello, is in phobos some function which convert float/double to string and is pure nogc and nothrow?i don't think that you can make it `pure`, but you certainly can make it `nothrow`, ` nogc` and ctfe-able. it's dangerous to go alone! take this[0]. [0] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/ctfefloat.d
Aug 08 2018
On Wednesday, 8 August 2018 at 17:40:11 UTC, ketmar wrote:vit wrote:thanks, that code can be modified to pure nothrow nogc safe. Is that lib ok? Is little complicated...Hello, is in phobos some function which convert float/double to string and is pure nogc and nothrow?i don't think that you can make it `pure`, but you certainly can make it `nothrow`, ` nogc` and ctfe-able. it's dangerous to go alone! take this[0]. [0] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/ctfefloat.d
Aug 08 2018
vit wrote:thanks, that code can be modified to pure nothrow nogc safe. Is that lib ok? Is little complicated...converting float to string is a *very* complicated task. that lib is quite small for what it is doing ('cause it hacks around some... interesting cases). the *real* thing will be a LOT bigger.
Aug 08 2018
On Wednesday, 8 August 2018 at 17:08:57 UTC, vit wrote:Hello, is in phobos some function which convert float/double to string and is pure nogc and nothrow?Short answer: no. Long answer: https://issues.dlang.org/show_bug.cgi?id=17628
Aug 08 2018