www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24082] New: std.int128.Int128: add toString that supports

https://issues.dlang.org/show_bug.cgi?id=24082

          Issue ID: 24082
           Summary: std.int128.Int128: add toString that supports
                    std.format
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

```
import std;
writeln(Int128.min);
```

Current output: "Int128(Cent(0, 9223372036854775808))"
Proposed output: "-170141183460469231731687303715884105728"

```
import std;
writefln("%x", Int128.min);
```

Currently throws std.format.FormatException "Expected '%s' format specifier for
type 'Int128'"
Proposed output: "7fffffffffffffffffffffffffffffff"

--
Aug 11 2023