VirtualBox

Changeset 96655 in vbox for trunk/src/VBox/VMM/tools


Ignore:
Timestamp:
Sep 8, 2022 11:10:56 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153537
Message:

VMM/IEM: Overflow of unsigned long fixed for a20 and a21, bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/tools/IEMGenFpuConstants.c

    r96407 r96655  
    133133
    134134    mpfr_init2(Val, 112 + 1);
    135     unsigned long uFactorial = 1; AssertCompile(sizeof(uFactorial) >= 8);
     135    mpfr_set_ui(Val, 1, MPFR_RNDD);
    136136    for (unsigned a = 1; a < 22; a++)
    137137    {
    138         uFactorial *= (a + 1);
    139         mpfr_div_ui(Val, One, uFactorial, MPFR_RNDD);
     138        mpfr_div_ui(Val, Val, a + 1, MPFR_RNDD);
    140139        PrintF128(Val, NULL, "a%u", a);
    141140    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette