digitalmars.D.learn - Is there anyway to access LLVM's 128 bit int type for C from LDC?
- Jack Stouffer (1/1) Dec 14 2017 Clang has __int128. Is there anyway to use this with D with LDC?
- Nicholas Wilson (7/8) Dec 14 2017 Not really as a plain type, although there is effort to get
- Jack Stouffer (6/15) Dec 14 2017 I'm looking to use it to store the coefficient in my precise
- Nicholas Wilson (3/20) Dec 14 2017 See also
- Jack Stouffer (3/5) Dec 14 2017 Thanks
- David Nadlinger (6/7) Dec 14 2017 There has been some work on this a while ago, by Kai, but it
Clang has __int128. Is there anyway to use this with D with LDC?
Dec 14 2017
On Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer wrote:Clang has __int128. Is there anyway to use this with D with LDC?Not really as a plain type, although there is effort to get [u]cent working. I could have sworn that mir was using InlineIR with it for multiplication. But InlineIR is the only way to get at it. What operation do you need on it?
Dec 14 2017
On Thursday, 14 December 2017 at 23:33:34 UTC, Nicholas Wilson wrote:On Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer wrote:I'm looking to use it to store the coefficient in my precise decimal type when you need more than 9 significant digits. I might just end up translating Boost's multiprecision lib to D if ucent is impossible.Clang has __int128. Is there anyway to use this with D with LDC?Not really as a plain type, although there is effort to get [u]cent working. I could have sworn that mir was using InlineIR with it for multiplication. But InlineIR is the only way to get at it. What operation do you need on it?
Dec 14 2017
On Friday, 15 December 2017 at 01:17:17 UTC, Jack Stouffer wrote:On Thursday, 14 December 2017 at 23:33:34 UTC, Nicholas Wilson wrote:See also https://github.com/d-gamedev-team/gfm/tree/master/integers/gfm/integersOn Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer wrote:I'm looking to use it to store the coefficient in my precise decimal type when you need more than 9 significant digits. I might just end up translating Boost's multiprecision lib to D if ucent is impossible.Clang has __int128. Is there anyway to use this with D with LDC?Not really as a plain type, although there is effort to get [u]cent working. I could have sworn that mir was using InlineIR with it for multiplication. But InlineIR is the only way to get at it. What operation do you need on it?
Dec 14 2017
On Friday, 15 December 2017 at 02:08:12 UTC, Nicholas Wilson wrote:See also https://github.com/d-gamedev-team/gfm/tree/master/integers/gfm/integersThanks
Dec 14 2017
On Thursday, 14 December 2017 at 19:47:53 UTC, Jack Stouffer wrote:Clang has __int128. Is there anyway to use this with D with LDC?There has been some work on this a while ago, by Kai, but it hasn't been merged yet: https://github.com/ldc-developers/ldc/pull/1355 — David
Dec 14 2017