Bug 20146 – Allow casting from std.bigint.BigInt to built-in floating point types

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-20T18:21:25Z
Last change time
2019-12-29T23:02:56Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2019-08-20T18:21:25Z
Currently only casting to integer types is supported.
Comment #1 by dlang-bot — 2019-08-20T18:35:06Z
@n8sh created dlang/phobos pull request #7151 "std.bigint.BigInt: allow casting to & comparison with floating point numbers" fixing this issue: - Fix Issue 20146 - Allow casting from std.bigint.BigInt to built-in floating point types Fix Issue 20147 - Enable comparison (==, >, >=, <=, <) between std.bigint.BigInt and floating point numbers Limitation: casting to & comparison with quadruple precision floating point numbers are not supported. The path for 80 bit extended floats use std.math.scalbn which currently is impure and non-CTFE-able. https://github.com/dlang/phobos/pull/7151
Comment #2 by dlang-bot — 2019-09-07T00:39:26Z
@n8sh updated dlang/phobos pull request #7172 "Fix Issue 20147 - Enable comparison (==, >, >=, <=, <) between std.bigint.BigInt and floating point numbers" fixing this issue: - Fix Issue 20146 - Allow casting from std.bigint.BigInt to built-in floating point types https://github.com/dlang/phobos/pull/7172
Comment #3 by dlang-bot — 2019-12-29T23:02:56Z
dlang/phobos pull request #7151 "std.bigint.BigInt: allow casting to floating point numbers" was merged into master: - 374cbd3e2291bb00f38419786dc204d2884ac158 by Nathan Sashihara: Fix Issue 20146 - Allow casting from std.bigint.BigInt to built-in floating point types https://github.com/dlang/phobos/pull/7151