Which function returns a pair after division ? (integer,frac)

claptrap clap at trap.com
Tue Sep 19 08:12:36 UTC 2023


On Tuesday, 19 September 2023 at 03:44:18 UTC, Vitaliy Fadeev 
wrote:
> What D function or D operator does this?
>
> ```asm
> IDIV EAX, r/m32
> ```
>
> ```
> IDIV 5, 2
>  EAX = 2
>  EDX = 1
> ```
>
> and returns (2,1) at once?

If you use LDC it'll automatically optimize that for you

https://d.godbolt.org/z/oz4h9ccbP


More information about the Digitalmars-d-learn mailing list