In C# I can do the following:
decimal v = 123.456M;
var span = new ReadOnlySpan<int>(&v, 4);
var flags = span[0];
var hi32 = span[1];
var lo32 = span[2];
var mi32 = span[3];
Is there a way to do the same in F# 5.0?
Context: I’m trying to port the Decimal.IsCanonical method from .NET 7 to .NET Framework 4.7.2 and F# 5.0. So I need to access the internal representation of a decimal number. The method will be used on a hot path, so I want to avoid using the Decimal.GetBits() method since it allocates an array.