Confirmed - indeed a rounding error somewhere, apparently in the representation of the numbers (printf?):
TestP10.exe
1.110999999999
2.221999999999
3.333
4.443999999999
5.554999999999
TestP9
1.111
2.222
3.333
4.444
5.555
With an int 3 inserted here...
_asm int 3;
Choice = va_arg(args, double);
_asm nop;
... I get identical results some steps later:
P9:
CPU Disasm
Address Hex dump Command Comments
00071076 ³> Ú6A 00 Úpush 0
00071078 ³. ³DD05 20700700 ³fld qword ptr [77020] ; float 5.555000000000000
0007107E ³. ³83EC 08 ³sub esp, 8
00071081 ³. ³DD1C24 ³fstp qword ptr [esp]
00071084 ³. ³DD05 18700700 ³fld qword ptr [77018] ; float 4.444000000000000
0007108A ³. ³83EC 08 ³sub esp, 8
0007108D ³. ³DD1C24 ³fstp qword ptr [esp]
00071090 ³. ³DD05 10700700 ³fld qword ptr [77010] ; float 3.333000000000000
00071096 ³. ³83EC 08 ³sub esp, 8
00071099 ³. ³DD1C24 ³fstp qword ptr [esp]
0007109C ³. ³DD05 08700700 ³fld qword ptr [77008] ; float 2.222000000000000
000710A2 ³. ³83EC 08 ³sub esp, 8
000710A5 ³. ³DD1C24 ³fstp qword ptr [esp]
000710A8 ³. ³DD05 00700700 ³fld qword ptr [77000] ; float 1.111000000000000
000710AE ³. ³83EC 08 ³sub esp, 8
000710B1 ³. ³DD1C24 ³fstp qword ptr [esp]
000710B4 ³. ³FF75 FC ³push dword ptr [ebp-4]
000710B7 ³. ³E8 44FFFFFF ³call 00071000
000710BC ³. ³83C4 30 ³add esp, 30
000710BF ³. ³DD5D F0 ³fstp qword ptr [ebp-10]
000710C2 ³. ³DD45 F0 ³fld qword ptr [ebp-10]
000710C5 ³. ³83EC 08 ³sub esp, 8
000710C8 ³. ³DD1C24 ³fstp qword ptr [esp]
000710CB ³. ³68 28700700 ³push offset 00077028 ; ASCII "% .15G",LF
000710D0 ³. ³E8 4B000000 ³call 00071120
P10:
CPU Disasm
Address Hex dump Command Comments
01391076 ³> Ú6A 00 Úpush 0
01391078 ³. ³DD05 20803901 ³fld qword ptr [1398020] ; float 5.555000000000000
0139107E ³. ³83EC 08 ³sub esp, 8
01391081 ³. ³DD1C24 ³fstp qword ptr [esp]
01391084 ³. ³DD05 18803901 ³fld qword ptr [1398018] ; float 4.444000000000000
0139108A ³. ³83EC 08 ³sub esp, 8
0139108D ³. ³DD1C24 ³fstp qword ptr [esp]
01391090 ³. ³DD05 10803901 ³fld qword ptr [1398010] ; float 3.333000000000000
01391096 ³. ³83EC 08 ³sub esp, 8
01391099 ³. ³DD1C24 ³fstp qword ptr [esp]
0139109C ³. ³DD05 08803901 ³fld qword ptr [1398008] ; float 2.222000000000000
013910A2 ³. ³83EC 08 ³sub esp, 8
013910A5 ³. ³DD1C24 ³fstp qword ptr [esp]
013910A8 ³. ³DD05 00803901 ³fld qword ptr [1398000] ; float 1.111000000000000
013910AE ³. ³83EC 08 ³sub esp, 8
013910B1 ³. ³DD1C24 ³fstp qword ptr [esp]
013910B4 ³. ³FF75 FC ³push dword ptr [ebp-4]
013910B7 ³. ³E8 44FFFFFF ³call 01391000
013910BC ³. ³83C4 30 ³add esp, 30
013910BF ³. ³DD5D F0 ³fstp qword ptr [ebp-10]
013910C2 ³. ³DD45 F0 ³fld qword ptr [ebp-10]
013910C5 ³. ³83EC 08 ³sub esp, 8
013910C8 ³. ³DD1C24 ³fstp qword ptr [esp]
013910CB ³. ³68 28803901 ³push offset 01398028 ; ASCII "% .15G",LF
013910D0 ³. ³E8 4B000000 ³call 01391120