News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Converting a Real10 to string

Started by RuiLoureiro, April 28, 2013, 05:26:33 AM

Previous topic - Next topic

Mikl__

dedndave,
Thank you very much! :t

dedndave

you bet, Mikl

have a look at this post
http://masm32.com/board/index.php?topic=1804.msg18923#msg18923
it explains that denormals and pseudo-denormals are stored with an exponent that should be adjusted

Mikl__

#32
; masm windows console #
include \masm32\include\masm32rt.inc
.686
.mmx
.xmm
Eprst proto lpReal10:ptr REAL10,lpDest:DWORD
.data
_Real10_R dd 0,0,0  ;0.0
dd 0,0,8000h        ;-0.0
dd 0,80000000h,3FFFh;1.0
dd 0,80000000h,4000h;2.0
dd 0FFFFFFFFh,0FFFFFFFFh,7FFEh;1.18973149535723176505e+4932
dd 0,80000000h,1;3.36210314311209350626e-4932 min pos normal
dd 0FFFFFFFFh,7FFFFFFFh,0;3.36210314311209350608e-4932 max subnormal
dd 1,0,0;3.64519953188247460253e-4951 min pos subnormal
dd 0,80000000h,7FFFh;+Infinity
dd 0,80000000h,0FFFFh;-Infinity
dd 0FFFFFFFFh,0FFFFFFFFh,7FFFh; QNaN
dd 0,0C0000000h,7FFFh; QNaN
dd 0FFFFFFFFh,0BFFFFFFFh,7FFFh; SNaN
dd 1,80000000h,7FFFh; SNaN
max_ten REAL10 1.0e+4931
    $max equ 60; <-- This number may be increased
    magic1 equ 4D10h;lg(2)*65536=19728,3...
    magic2  equ 35269h;log2(10)*65536=3,32192809488736234780*65536=217705,8796265381788254208..
.const
    cntr = -$max
    REPEAT 2*$max+1
        IF cntr NE 0
            REAL10 @CatStr(<1.0e>,%-cntr)
        ELSE
            tabs REAL10 1.0
        ENDIF
        WORD 0
        cntr = cntr + 1
    ENDM

    table0  label word
n=0
rept 100
dw (n mod 10 shl 8)+(n/10)+"00"
n=n+1
endm   
    table1 dd shift0,shift1,shift2,shift3,shift4
.code
main proc
LOCAL result[32]:BYTE

mov ecx,14
mov ebx,offset _Real10_R
@@: push ecx
invoke Eprst,ebx,ADDR result
print ADDR result,13,10
add ebx,12
pop ecx
loop @b
    inkey " *** STOP - Eprst --- E N D ---*** "
    exit
   
main endp
Eprst proc uses edi esi ebx lpReal10: ptr REAL10,lpDest:DWORD
local iExp:dword
local aExp:dword
local x[3]:dword
local temp1:dword
local temp2:dword
fninit
        mov ecx,lpReal10
fld tbyte ptr [ecx]
mov edi,lpDest
mov ebx,[ecx]
mov aExp,0
mov eax,[ecx+4]
mov [x],ebx
movzx edx,word ptr [ecx+8]
mov [x+4],eax
mov [x+8],edx
cmp edx,8000h ;positive or negative number?
mov byte ptr [edi],'-'
sbb esi,esi   ;if positive esi=0FFFFFFFFh if negative esi=0
and esi,0Dh   ;if positive esi=0Dh if negative esi=0
sub [edi],esi ;if positive [edi]=" " if negative [edi]="-"
and edx,7FFFh ;fabs
jnz a2        ;normal or Infinity or SNAN or QNAN or Uncertainty
Zero_Or_Denormal_or_Normal: cmp edx,eax
jnz Denormal_or_Normal
        cmp ebx,eax
jnz Denormal_or_Normal
mov dword ptr [edi+1],'oreZ'
mov dword ptr [edi+5],0
        ret
Denormal_or_Normal: test eax,80000000h
jnz _Normal
Denormal:fld max_ten  ;st(0)=1.0e+4931
mov aExp,-4931*4
fmul                  ;normalization
fld st
fstp tbyte ptr x
mov ebx,x
mov eax,x+4
mov edx,x+8
jmp _Normal
a2: cmp edx,7FFFh
jz Infinity_Or_SNAN_Or_QNAN_Or_Uncertainty
_Normal:mov esi,10
sub edx,16383
mov word ptr [edi+21],'+E'
imul edx,magic1
and edx,0FFFF0000h
sar edx,14
mov iExp,edx
jz @f
cmp edx,4*$max
jg a1
cmp edx,-4*$max
jge load
;------------------------------------------------
dec edx
a1: neg edx;
sar edx,2
mov temp1,edx
imul edx,magic2
sar edx,16
mov temp2,edx
fild temp2         ; get the characteristic
fild temp1         ; log2(10)*expscale
fldl2t    ; log2(10)
        fmul               ; log2(10)*expscale
        fsub st,st(1)      ; get only the mantissa but keep the characteristic
        f2xm1              ; 2^(mantissa)-1
        fld1
        fadd               ; add 1 and pop
        fscale
        fstp    st(1)      ; remove the characteristic
        jmp multiply
load: fld tabs[edx+edx*2]
multiply:fmul              ; X * 10^expscaleS
fld st
fstp tbyte ptr x
xor edx,edx
@@: mov ecx,x+8
mov ebx,x
        mov eax,x+4
and ecx,7FFFh
sub ecx,16382
cmp ecx,4
ja shift0
jmp table1[ecx*4]
shift4::test eax,60000000h
jz a6
fld tabs[12]
fmul
add iExp,4
fstp tbyte ptr x
mov eax,x+4
        mov ebx,x
shld edx,eax,1
shld eax,ebx,1
shl ebx,1
add ebx,4
jmp shift0
a6: shld edx,eax,4 ;ecx=1 ebx+4
shld eax,ebx,4 ;ecx=2 ebx+8
shl ebx,4      ;ecx=3 ebx+9
add ebx,12     ;ecx=4 ebx+12
jmp shift0
shift3::shld edx,eax,3
shld eax,ebx,3
shl ebx,3
add ebx,9;10
jmp shift0
shift2::shld edx,eax,2
shld eax,ebx,2
shl ebx,2
add ebx,8
jmp shift0
shift1::shld edx,eax,1
shld eax,ebx,1
shl ebx,1
add ebx,4
shift0::adc eax,0
adc edx,0
mov [edi+1],dl
mov byte ptr [edi+2],','
or byte ptr [edi+1],'0'
   
k=3
    REPEAT 17
        mul esi
        mov [edi+k],dl
        mov ecx,eax
        mov eax,ebx
        mul esi
        add ecx,edx
        adc byte ptr [edi+k],'0'
        mov ebx,eax
        mov eax,ecx
k=k+1
    ENDM

mul esi
mov [edi+k],dl
mov ecx,eax
mov eax,ebx
mul esi
add ecx,edx
adc byte ptr [edi+k],'0'
;--------------------------------------
mov eax,iExp
add eax,aExp
mov edx,eax
sar eax,2
sar edx,31
mov ecx,esi
xor eax,edx
sub eax,edx
and edx,2
add byte ptr [edi+22],dl
mov esi,eax
mov edx,42949673;2^32/100
mul edx
mov eax,dword ptr table0[edx*2] ;edx = quotient of the division by 100
mov dword ptr [edi+23],eax
lea eax,[edx*4]
shl edx,2
lea edx,[edx+edx*2]
lea edx,[eax+edx*8] ;edx = quotient*100
sub esi,edx ;esi = remainder of the division by 100
mov eax,dword ptr table0[esi*2]
mov dword ptr [edi+25],eax
mov dword ptr [edi+27],0
ret
Infinity_Or_SNAN_Or_QNAN_Or_Uncertainty:
cmp eax,80000000h
jnz SNAN_Or_QNAN_Or_Uncertainty
and ebx,ebx
jnz SNAN_Or_QNAN_Or_Uncertainty
        mov dword ptr [edi+1],'ifnI'
        mov dword ptr [edi+5],'ytin'
        mov dword ptr [edi+9],0
ret
SNAN_Or_QNAN_Or_Uncertainty:
test eax,eax
jns error
test eax,40000000h
jnz QNAN
        mov dword ptr [edi+1],'ngiS'
        mov dword ptr [edi+5],'N la'
        mov dword ptr [edi+9],'a no'
        mov dword ptr [edi+13],'muN '
        mov dword ptr [edi+17],'reb'
ret
QNAN: test eax,3FFFFFFFh
jnz @f
test ebx,ebx
jnz @f
        mov dword ptr [edi+1],'ecnU'
        mov dword ptr [edi+5],'iatr'
        mov dword ptr [edi+9],'ytn'
ret
@@: mov dword ptr [edi+1],'eiuQ'
        mov dword ptr [edi+5],'oN t'
        mov dword ptr [edi+9],' a n'
        mov dword ptr [edi+13],'bmuN'
        mov dword ptr [edi+17],'re'
ret
error: mov dword ptr [edi+1],'orrE'
        mov dword ptr [edi+5],'r'
ret
Eprst endp
end main

datavalueEprst
dd 0,0,0h+0.0 Zero
dd 0,0,8000h-0.0-Zero
dd 0,80000000h,3FFFh1.0 1,000000000000000000E+0000
dd 0,80000000h,4000h2.0 2,000000000000000000E+0000
dd 0FFFFFFFFh,0FFFFFFFFh,7FFEh1.18973149535723176505e+49321,189731495357231764E+4932
dd 0,80000000h,13.36210314311209350626e-4932
min positive normal
3,362103143112092086E-4932
dd 0FFFFFFFFh,7FFFFFFFh,03.36210314311209350608e-4932
max subnormal
3,362103143112093506E-4932
dd 1,0,03.64519953188247460253e-4951
min positive subnormal
3,645199531882474602E-4951
dd 0,80000000h,7FFFh+Infinity Infinity
dd 0,80000000h,0FFFFh-Infinity-Infinity
dd 0FFFFFFFFh,0FFFFFFFFh,7FFFhQNaNQuiet Non a Number
dd 0,0C0000000h,7FFFh QNaN Uncertainty
dd 0FFFFFFFFh,0BFFFFFFFh,7FFFh SNaN Signal Non a Number
dd 1,80000000h,7FFFh SNaN Signal Non a Number

jj2007

Reply #18:
3,141592653589793238E+0000
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
*** STOP - Converting PI ***
697 cycles, ConvertFloat10ZX, _Real10_2

1161 cycles, ConvertFloat10, _Real10_2

692 cycles, ConvertFloat10Z, _Real10_2

1002 cycles, ConvertFloat10DF, _Real10_2

928 cycles, ConvertFloat10DR, _Real10_2

565 cycles, ConvertFloat10BX, _Real10_2

561 cycles, ConvertFloat10BF, _Real10_2

561 cycles, ConvertFloat10BY, _Real10_2

943 cycles, ConvertFloat10DY, _Real10_2

938 cycles, ConvertFloat10DX, _Real10_2

513 cycles, ConvertFloat10CT, _Real10_2

990 cycles, ConvertFloat10DS, _Real10_2

852 cycles, ConvertFloat10BW, _Real10_2

1222 cycles, ConvertFloat10DW, _Real10_2

738 cycles, ConvertFloat10MR, _Real10_2

999 cycles, ConvertFloat10DFD, _Real10_2

920 cycles, ConvertFloat10DRD, _Real10_2

569 cycles, ConvertFloat10BXD, _Real10_2

560 cycles, ConvertFloat10BFD, _Real10_2

560 cycles, ConvertFloat10BYD, _Real10_2

933 cycles, ConvertFloat10DYD, _Real10_2

929 cycles, ConvertFloat10DXD, _Real10_2

518 cycles, ConvertFloat10CTD, _Real10_2

993 cycles, ConvertFloat10DSD, _Real10_2

853 cycles, ConvertFloat10BWD, _Real10_2

1199 cycles, ConvertFloat10DWD, _Real10_2

993 cycles, ConvertReal10DF, _Real10_2

919 cycles, ConvertReal10DR, _Real10_2

564 cycles, ConvertReal10BX, _Real10_2

563 cycles, ConvertReal10BF, _Real10_2

563 cycles, ConvertReal10BY, _Real10_2

934 cycles, ConvertReal10DY, _Real10_2

935 cycles, ConvertReal10DX, _Real10_2

511 cycles, ConvertReal10CT, _Real10_2

1011 cycles, ConvertReal10DS, _Real10_2

843 cycles, ConvertReal10BW, _Real10_2

1226 cycles, ConvertReal10DW, _Real10_2

1006 cycles, ConvertReal10DFD, _Real10_2

920 cycles, ConvertReal10DRD, _Real10_2

559 cycles, ConvertReal10BXD, _Real10_2

561 cycles, ConvertReal10BFD, _Real10_2

561 cycles, ConvertReal10BYD, _Real10_2

946 cycles, ConvertReal10DYD, _Real10_2

935 cycles, ConvertReal10DXD, _Real10_2

511 cycles, ConvertReal10CTD, _Real10_2

1006 cycles, ConvertReal10DSD, _Real10_2

854 cycles, ConvertReal10BWD, _Real10_2

1218 cycles, ConvertReal10DWD, _Real10_2

458 cycles, Eprst, _Real10_2

*** Press any key to get the time table ***

***** Time table *****

Intel(R) Celeron(R) M CPU        420  @ 1.60GHz (SSE3)

458  cycles, Eprst, -18 digits
511  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
511  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
513  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
518  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
559  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
560  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
560  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
561  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
561  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
561  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
561  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
563  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
563  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
564  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
565  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
569  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
692  cycles, ConvertFloat10Z, BCD -old - 18 digits
697  cycles, ConvertFloat10ZX, BCD - old - 18 digits
738  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
843  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
852  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
853  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
854  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
919  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
920  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
920  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
928  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
929  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
933  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
934  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
935  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
935  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
938  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
943  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
946  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
990  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
993  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
993  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
999  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
1002  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
1006  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
1006  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
1011  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
1161  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
1199  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
1218  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
1222  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
1226  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
********** END **********

RuiLoureiro

#34
Quote from: Mikl__ on May 15, 2013, 05:35:22 PM
Hi, dedndave!
Quotefrom DAVE evaluator prog:
About what kind of program said RuiLoureiro?

2.99GHz 3.49Gb RAM Pentium 4 (Eprst.zip)
465 MHz, 256 Mb RAM Celeron (02.zip)

Mikl,
        Your results seems to be good in some processors
        but very bad in my P4. So the conclusion seems to be
        this: your proc is good to you and my procs are good to me.

        Meanwhile there is a difference (significant ?).
        Your proc uses only the scientific format, so it prints
        1.000000000000000000E+0000 instead of 1.0.
        Well, it is an option. If i had time, i will modify one
        of them to compare with your proc in your system.
        I hope that you develop and improve it. It was good if
        you explained something about it.

RuiLoureiro

Hi all,
       Could you run TestCycles10_18D.asm in your
       system if it is not a P4, please ?
       Thanks

Mikl,
       Could you test this ?

note: to test, i am using some macros written by MichaelW
          that you can find in MASM

My results       
Quote
*** Press any key to get the time table ***

***** Time table *****

Intel(R) Pentium(R) 4 CPU 3.40GHz (SSE3)

772  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
775  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
780  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
784  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
784  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
785  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
786  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
798  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
801  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
801  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
803  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
804  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
810  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
812  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
813  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
825  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
963  cycles, ConvertReal10CTT, BCD-CTT, fxam, extract, esp - 18 digits
1158  cycles, ConvertFloat10ZX, BCD - old - 18 digits
1185  cycles, ConvertFloat10Z, BCD -old - 18 digits
1268  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
1389  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
1393  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
1394  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
1394  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
1400  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
1401  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
1409  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
1425  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
1458  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
1463  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
1474  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
1499  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
1516  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
1517  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
1527  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
1529  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
1530  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
1554  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
1561  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
1779  cycles, Eprst, -18 digits
2002  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
3086  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
3112  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3160  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3196  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3647  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3716  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
3719  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
3821  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
4118  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
********** END **********

Gunther

Hi RuiLoureiro

here are the results (not a P4):

3,141592653589793238E+0000
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
-123456789.56789
*** STOP - Converting PI ***
568 cycles, ConvertFloat10ZX, _Real10_2

936 cycles, ConvertFloat10, _Real10_2

513 cycles, ConvertFloat10Z, _Real10_2

458 cycles, ConvertFloat10DF, _Real10_2

407 cycles, ConvertFloat10DR, _Real10_2

351 cycles, ConvertFloat10BX, _Real10_2

367 cycles, ConvertFloat10BF, _Real10_2

370 cycles, ConvertFloat10BY, _Real10_2

406 cycles, ConvertFloat10DY, _Real10_2

403 cycles, ConvertFloat10DX, _Real10_2

357 cycles, ConvertFloat10CT, _Real10_2

457 cycles, ConvertFloat10DS, _Real10_2

654 cycles, ConvertFloat10BW, _Real10_2

825 cycles, ConvertFloat10DW, _Real10_2

375 cycles, ConvertFloat10MR, _Real10_2

459 cycles, ConvertFloat10DFD, _Real10_2

407 cycles, ConvertFloat10DRD, _Real10_2

366 cycles, ConvertFloat10BXD, _Real10_2

359 cycles, ConvertFloat10BFD, _Real10_2

358 cycles, ConvertFloat10BYD, _Real10_2

405 cycles, ConvertFloat10DYD, _Real10_2

405 cycles, ConvertFloat10DXD, _Real10_2

371 cycles, ConvertFloat10CTD, _Real10_2

463 cycles, ConvertFloat10DSD, _Real10_2

665 cycles, ConvertFloat10BWD, _Real10_2

816 cycles, ConvertFloat10DWD, _Real10_2

462 cycles, ConvertReal10DF, _Real10_2

403 cycles, ConvertReal10DR, _Real10_2

373 cycles, ConvertReal10BX, _Real10_2

366 cycles, ConvertReal10BF, _Real10_2

365 cycles, ConvertReal10BY, _Real10_2

404 cycles, ConvertReal10DY, _Real10_2

405 cycles, ConvertReal10DX, _Real10_2

362 cycles, ConvertReal10CT, _Real10_2

352 cycles, ConvertReal10CTT, _Real10_2

456 cycles, ConvertReal10DS, _Real10_2

645 cycles, ConvertReal10BW, _Real10_2

823 cycles, ConvertReal10DW, _Real10_2

461 cycles, ConvertReal10DFD, _Real10_2

407 cycles, ConvertReal10DRD, _Real10_2

369 cycles, ConvertReal10BXD, _Real10_2

361 cycles, ConvertReal10BFD, _Real10_2

363 cycles, ConvertReal10BYD, _Real10_2

410 cycles, ConvertReal10DYD, _Real10_2

407 cycles, ConvertReal10DXD, _Real10_2

360 cycles, ConvertReal10CTD, _Real10_2

460 cycles, ConvertReal10DSD, _Real10_2

669 cycles, ConvertReal10BWD, _Real10_2

820 cycles, ConvertReal10DWD, _Real10_2

236 cycles, Eprst, _Real10_2

*** Press any key to get the time table ***

***** Time table *****

Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (SSE4)

236  cycles, Eprst, -18 digits
351  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
352  cycles, ConvertReal10CTT, BCD-CTT, fxam, extract, esp - 18 digits
357  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
358  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
359  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
360  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
361  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
362  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
363  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
365  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
366  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
366  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
367  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
369  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
370  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
371  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
373  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
375  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
403  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
403  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
404  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
405  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
405  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
405  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
406  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
407  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
407  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
407  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
407  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
410  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
456  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
457  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
458  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
459  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
460  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
461  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
462  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
463  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
513  cycles, ConvertFloat10Z, BCD -old - 18 digits
568  cycles, ConvertFloat10ZX, BCD - old - 18 digits
645  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
654  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
665  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
669  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
816  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
820  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
823  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
825  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
936  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
********** END **********


Gunther
You have to know the facts before you can distort them.

jj2007

Celeron M:
3,141592653589793238E+0000
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
-123456789.56789
*** STOP - Converting PI ***
632 cycles, ConvertFloat10ZX, _Real10_2

1079 cycles, ConvertFloat10, _Real10_2

633 cycles, ConvertFloat10Z, _Real10_2

851 cycles, ConvertFloat10DF, _Real10_2

791 cycles, ConvertFloat10DR, _Real10_2

425 cycles, ConvertFloat10BX, _Real10_2

411 cycles, ConvertFloat10BF, _Real10_2

411 cycles, ConvertFloat10BY, _Real10_2

795 cycles, ConvertFloat10DY, _Real10_2

783 cycles, ConvertFloat10DX, _Real10_2

374 cycles, ConvertFloat10CT, _Real10_2

849 cycles, ConvertFloat10DS, _Real10_2

715 cycles, ConvertFloat10BW, _Real10_2

1085 cycles, ConvertFloat10DW, _Real10_2

596 cycles, ConvertFloat10MR, _Real10_2

849 cycles, ConvertFloat10DFD, _Real10_2

772 cycles, ConvertFloat10DRD, _Real10_2

439 cycles, ConvertFloat10BXD, _Real10_2

432 cycles, ConvertFloat10BFD, _Real10_2

431 cycles, ConvertFloat10BYD, _Real10_2

787 cycles, ConvertFloat10DYD, _Real10_2

785 cycles, ConvertFloat10DXD, _Real10_2

389 cycles, ConvertFloat10CTD, _Real10_2

864 cycles, ConvertFloat10DSD, _Real10_2

706 cycles, ConvertFloat10BWD, _Real10_2

1078 cycles, ConvertFloat10DWD, _Real10_2

844 cycles, ConvertReal10DF, _Real10_2

771 cycles, ConvertReal10DR, _Real10_2

419 cycles, ConvertReal10BX, _Real10_2

429 cycles, ConvertReal10BF, _Real10_2

430 cycles, ConvertReal10BY, _Real10_2

785 cycles, ConvertReal10DY, _Real10_2

785 cycles, ConvertReal10DX, _Real10_2

376 cycles, ConvertReal10CT, _Real10_2

350 cycles, ConvertReal10CTT, _Real10_2

874 cycles, ConvertReal10DS, _Real10_2

694 cycles, ConvertReal10BW, _Real10_2

1086 cycles, ConvertReal10DW, _Real10_2

851 cycles, ConvertReal10DFD, _Real10_2

790 cycles, ConvertReal10DRD, _Real10_2

431 cycles, ConvertReal10BXD, _Real10_2

430 cycles, ConvertReal10BFD, _Real10_2

431 cycles, ConvertReal10BYD, _Real10_2

784 cycles, ConvertReal10DYD, _Real10_2

784 cycles, ConvertReal10DXD, _Real10_2

374 cycles, ConvertReal10CTD, _Real10_2

850 cycles, ConvertReal10DSD, _Real10_2

716 cycles, ConvertReal10BWD, _Real10_2

1086 cycles, ConvertReal10DWD, _Real10_2

362 cycles, Eprst, _Real10_2

*** Press any key to get the time table ***

***** Time table *****

Intel(R) Celeron(R) M CPU        420  @ 1.60GHz (SSE3)

350  cycles, ConvertReal10CTT, BCD-CTT, fxam, extract, esp - 18 digits
362  cycles, Eprst, -18 digits
374  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
374  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
376  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
389  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
411  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
411  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
419  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
425  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
429  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
430  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
430  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
431  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
431  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
431  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
432  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
439  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
596  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
632  cycles, ConvertFloat10ZX, BCD - old - 18 digits
633  cycles, ConvertFloat10Z, BCD -old - 18 digits
694  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
706  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
715  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
716  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
771  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
772  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
783  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
784  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
784  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
785  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
785  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
785  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
787  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
790  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
791  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
795  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
844  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
849  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
849  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
850  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
851  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
851  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
864  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
874  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
1078  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
1079  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
1085  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
1086  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
1086  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits

RuiLoureiro

Thanks Gunther  :t
Thanks Jochen     :t

Another one
                     Could you test this, if you dont mind
                     please (If not a P4 CPU) ?
Quote
*** Press any key to get the time table ***

***** Time table *****

Intel(R) Pentium(R) 4 CPU 3.40GHz (SSE3)

746  cycles, ConvertReal10CTE, BCD-CTE,examine, extract, esp - 18 digits
761  cycles, ConvertReal10CTT, BCD-CTT, fxam, extract, esp - 18 digits
770  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
774  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
776  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
786  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
790  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
791  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
792  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
796  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
797  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
797  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
797  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
801  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
801  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
805  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
809  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
809  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
1158  cycles, ConvertFloat10ZX, BCD - old - 18 digits
1180  cycles, ConvertFloat10Z, BCD -old - 18 digits
1272  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
1385  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
1389  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
1392  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
1395  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
1398  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
1401  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
1402  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
1406  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
1460  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
1461  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
1461  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
1466  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
1511  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
1513  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
1533  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
1539  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
1543  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
1555  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
1559  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
1568  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
1763  cycles, Eprst, -18 digits
3055  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3063  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
3066  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3152  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3162  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
3709  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
3726  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
3810  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
3891  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
********** END **********

Gunther

Hi RuiLoureiro,

here are the results:

3,141592653589793238E+0000
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
3.14159265358979324
*** STOP - Converting PI ***
-123456789.56789
661 cycles, ConvertFloat10ZX, _Real10_2

1079 cycles, ConvertFloat10, _Real10_2

575 cycles, ConvertFloat10Z, _Real10_2

604 cycles, ConvertFloat10DF, _Real10_2

537 cycles, ConvertFloat10DR, _Real10_2

377 cycles, ConvertFloat10BX, _Real10_2

375 cycles, ConvertFloat10BF, _Real10_2

375 cycles, ConvertFloat10BY, _Real10_2

569 cycles, ConvertFloat10DY, _Real10_2

543 cycles, ConvertFloat10DX, _Real10_2

326 cycles, ConvertFloat10CT, _Real10_2

573 cycles, ConvertFloat10DS, _Real10_2

703 cycles, ConvertFloat10BW, _Real10_2

874 cycles, ConvertFloat10DW, _Real10_2

512 cycles, ConvertFloat10MR, _Real10_2

581 cycles, ConvertFloat10DFD, _Real10_2

548 cycles, ConvertFloat10DRD, _Real10_2

407 cycles, ConvertFloat10BXD, _Real10_2

378 cycles, ConvertFloat10BFD, _Real10_2

382 cycles, ConvertFloat10BYD, _Real10_2

533 cycles, ConvertFloat10DYD, _Real10_2

529 cycles, ConvertFloat10DXD, _Real10_2

363 cycles, ConvertFloat10CTD, _Real10_2

595 cycles, ConvertFloat10DSD, _Real10_2

723 cycles, ConvertFloat10BWD, _Real10_2

875 cycles, ConvertFloat10DWD, _Real10_2

607 cycles, ConvertReal10DF, _Real10_2

510 cycles, ConvertReal10DR, _Real10_2

389 cycles, ConvertReal10BX, _Real10_2

389 cycles, ConvertReal10BF, _Real10_2

385 cycles, ConvertReal10BY, _Real10_2

543 cycles, ConvertReal10DY, _Real10_2

546 cycles, ConvertReal10DX, _Real10_2

338 cycles, ConvertReal10CT, _Real10_2

319 cycles, ConvertReal10CTT, _Real10_2

314 cycles, ConvertReal10CTE, _Real10_2

572 cycles, ConvertReal10DS, _Real10_2

692 cycles, ConvertReal10BW, _Real10_2

897 cycles, ConvertReal10DW, _Real10_2

578 cycles, ConvertReal10DFD, _Real10_2

520 cycles, ConvertReal10DRD, _Real10_2

388 cycles, ConvertReal10BXD, _Real10_2

390 cycles, ConvertReal10BFD, _Real10_2

400 cycles, ConvertReal10BYD, _Real10_2

535 cycles, ConvertReal10DYD, _Real10_2

533 cycles, ConvertReal10DXD, _Real10_2

339 cycles, ConvertReal10CTD, _Real10_2

596 cycles, ConvertReal10DSD, _Real10_2

721 cycles, ConvertReal10BWD, _Real10_2

878 cycles, ConvertReal10DWD, _Real10_2

299 cycles, Eprst, _Real10_2

*** Press any key to get the time table ***

***** Time table *****

Pentium(R) Dual-Core  CPU      E5800  @ 3.20GHz (SSE4)

299  cycles, Eprst, -18 digits
314  cycles, ConvertReal10CTE, BCD-CTE,examine, extract, esp - 18 digits
319  cycles, ConvertReal10CTT, BCD-CTT, fxam, extract, esp - 18 digits
326  cycles, ConvertFloat10CT, BCD-CT, fxam, fxtract, esp - 18 digits
338  cycles, ConvertReal10CT, BCD-CT, fxam, fxtract, esp - 18 digits
339  cycles, ConvertReal10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
363  cycles, ConvertFloat10CTD, BCD-CT, fxam, fxtract, esp - 18 digits
375  cycles, ConvertFloat10BY, BCD, examine, fxtract, esp - 18 digits
375  cycles, ConvertFloat10BF, BCD, fxam, fxtract, esp - 18 digits
377  cycles, ConvertFloat10BX, BCD, fxam, fxtract, ebp - 18 digits
378  cycles, ConvertFloat10BFD, BCD, fxam, fxtract, esp - 18 digits
382  cycles, ConvertFloat10BYD, BCD, examine, fxtract, esp - 18 digits
385  cycles, ConvertReal10BY, BCD, examine, fxtract, esp - 18 digits
388  cycles, ConvertReal10BXD, BCD, fxam, fxtract, ebp - 18 digits
389  cycles, ConvertReal10BX, BCD, fxam, fxtract, ebp - 18 digits
389  cycles, ConvertReal10BF, BCD, fxam, fxtract, esp - 18 digits
390  cycles, ConvertReal10BFD, BCD, fxam, fxtract, esp - 18 digits
400  cycles, ConvertReal10BYD, BCD, examine, fxtract, esp - 18 digits
407  cycles, ConvertFloat10BXD, BCD, fxam, fxtract, ebp - 18 digits
510  cycles, ConvertReal10DR, direct, examine, fxtract, ebp - 18 digits
512  cycles, ConvertFloat10MR, direct MN, examine, fxtract, ebp - 18 digits
520  cycles, ConvertReal10DRD, direct, examine, fxtract, ebp - 18 digits
529  cycles, ConvertFloat10DXD, direct, fxam, fxtract, esp - 18 digits
533  cycles, ConvertReal10DXD, direct, fxam, fxtract, esp - 18 digits
533  cycles, ConvertFloat10DYD, direct, examine, fxtract, esp - 18 digits
535  cycles, ConvertReal10DYD, direct, examine, fxtract, esp - 18 digits
537  cycles, ConvertFloat10DR, direct, examine, fxtract, ebp - 18 digits
543  cycles, ConvertReal10DY, direct, examine, fxtract, esp - 18 digits
543  cycles, ConvertFloat10DX, direct, fxam, fxtract, esp - 18 digits
546  cycles, ConvertReal10DX, direct, fxam, fxtract, esp - 18 digits
548  cycles, ConvertFloat10DRD, direct, examine, fxtract, ebp - 18 digits
569  cycles, ConvertFloat10DY, direct, examine, fxtract, esp - 18 digits
572  cycles, ConvertReal10DS, direct, fxam, fyl2x, ebp - 18 digits
573  cycles, ConvertFloat10DS, direct, fxam, fyl2x, ebp - 18 digits
575  cycles, ConvertFloat10Z, BCD -old - 18 digits
578  cycles, ConvertReal10DFD, direct, examine, fyl2x, ebp - 18 digits
581  cycles, ConvertFloat10DFD, direct, examine, fyl2x, ebp - 18 digits
595  cycles, ConvertFloat10DSD, direct, fxam, fyl2x, ebp - 18 digits
596  cycles, ConvertReal10DSD, direct, fxam, fyl2x, ebp - 18 digits
604  cycles, ConvertFloat10DF, direct, examine, fyl2x, ebp - 18 digits
607  cycles, ConvertReal10DF, direct, examine, fyl2x, ebp - 18 digits
661  cycles, ConvertFloat10ZX, BCD - old - 18 digits
692  cycles, ConvertReal10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
703  cycles, ConvertFloat10BW, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
721  cycles, ConvertReal10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
723  cycles, ConvertFloat10BWD, BCD, Save FPU, fxam, fxtract, ebp - 18 digits
874  cycles, ConvertFloat10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
875  cycles, ConvertFloat10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
878  cycles, ConvertReal10DWD, direct,Save FPU, fxam, fxtract, esp -18 digits
897  cycles, ConvertReal10DW, direct,Save FPU, fxam, fxtract, esp -18 digits
1079  cycles, ConvertFloat10, BCD, Save FPU -old - 18 digits
********** END **********

And the other archive:

0
1.0000000000000000e+00
2.0000000000000000e+00
3.0000000000000000e+00
4.0000000000000000e+00
5.0000000000000000e+00
6.0000000000000000e+00
7.0000000000000000e+00
8.0000000000000000e+00
9.0000000000000000e+00
1.00000000000000000e-01
2.0000000000000000e-01
3.0000000000000000e-01
4.0000000000000000e-01
5.0000000000000000e-01
6.0000000000000000e-01
7.0000000000000000e-01
8.0000000000000000e-01
9.0000000000000000e-01
*** STOP - ConvertReal10CTE  end test digits ***
-1.1000000000000000e+00
-1.11000000000000000e+01
-1.11100000000000000e+02
-1.1111000000000000e+03
-1.11111000000000000e+04
-1.11111100000000000e+05
-1.1111111000000000e+06
-1.11111111000000000e+07
-1.11111111100000000e+08
-1.1111111111000000e+09
-1.11111111111000000e+10
-1.11111111111100000e+11
-1.1111111111111000e+12
-1.11111111111111000e+13
-1.11111111111111100e+14
-1.11111111111111110e+15
-1.11111111111111111e+16
-1.11111111111111111e+17
-2.2000000000000000e+00
-2.2200000000000000e+01
-2.2220000000000000e+02
-2.2222000000000000e+03
-2.2222200000000000e+04
-2.2222220000000000e+05
-2.2222222000000000e+06
-2.2222222200000000e+07
-2.2222222220000000e+08
-2.2222222222000000e+09
-2.2222222222200000e+10
-2.2222222222220000e+11
-2.2222222222222000e+12
-2.2222222222222200e+13
-2.2222222222222220e+14
-2.2222222222222222e+15
-2.2222222222222222e+16
-2.2222222222222222e+17
-3.3000000000000000e+00
-3.3300000000000000e+01
-3.3330000000000000e+02
-3.3333000000000000e+03
-3.3333300000000000e+04
-3.3333330000000000e+05
-3.3333333000000000e+06
-3.3333333300000000e+07
-3.3333333330000000e+08
-3.3333333333000000e+09
-3.3333333333300000e+10
-3.3333333333330000e+11
-3.3333333333333000e+12
-3.3333333333333300e+13
-3.3333333333333330e+14
-3.3333333333333333e+15
-3.3333333333333333e+16
-3.3333333333333333e+17
*** STOP - ConvertReal10CTE ***
-4.4000000000000000e+00
-4.4400000000000000e+01
-4.4440000000000000e+02
-4.4444000000000000e+03
-4.4444400000000000e+04
-4.4444440000000000e+05
-4.4444444000000000e+06
-4.4444444400000000e+07
-4.4444444440000000e+08
-4.4444444444000000e+09
-4.4444444444400000e+10
-4.4444444444440000e+11
-4.4444444444444000e+12
-4.4444444444444400e+13
-4.4444444444444440e+14
-4.4444444444444444e+15
-4.4444444444444444e+16
-4.4444444444444444e+17
-5.5000000000000000e+00
-5.5500000000000000e+01
-5.5550000000000000e+02
-5.5555000000000000e+03
-5.5555500000000000e+04
-5.5555550000000000e+05
-5.5555555000000000e+06
-5.5555555500000000e+07
-5.5555555550000000e+08
-5.5555555555000000e+09
-5.5555555555500000e+10
-5.5555555555550000e+11
-5.5555555555555000e+12
-5.5555555555555500e+13
-5.5555555555555550e+14
-5.5555555555555555e+15
-5.5555555555555556e+16
-5.5555555555555556e+17
-6.6000000000000000e+00
-6.6600000000000000e+01
-6.6660000000000000e+02
-6.6666000000000000e+03
-6.6666600000000000e+04
-6.6666660000000000e+05
-6.6666666000000000e+06
-6.6666666600000000e+07
-6.6666666660000000e+08
-6.6666666666000000e+09
-6.6666666666600000e+10
-6.6666666666660000e+11
-6.6666666666666000e+12
-6.6666666666666600e+13
-6.6666666666666660e+14
-6.6666666666666666e+15
-6.6666666666666667e+16
-6.6666666666666667e+17
-7.7000000000000000e+00
-7.7700000000000000e+01
-7.7770000000000000e+02
-7.7777000000000000e+03
-7.7777700000000000e+04
-7.7777770000000000e+05
-7.7777777000000000e+06
-7.7777777700000000e+07
-7.7777777770000000e+08
-7.7777777777000000e+09
-7.7777777777700000e+10
-7.7777777777770000e+11
-7.7777777777777000e+12
-7.7777777777777700e+13
-7.7777777777777770e+14
-7.7777777777777777e+15
-7.7777777777777778e+16
-7.7777777777777778e+17
*** STOP - ConvertReal10CTE ***
-8.8000000000000000e+00
-8.8800000000000000e+01
-8.8880000000000000e+02
-8.8888000000000000e+03
-8.8888800000000000e+04
-8.8888880000000000e+05
-8.8888888000000000e+06
-8.8888888800000000e+07
-8.8888888880000000e+08
-8.8888888888000000e+09
-8.8888888888800000e+10
-8.8888888888880000e+11
-8.8888888888888000e+12
-8.8888888888888800e+13
-8.8888888888888880e+14
-8.8888888888888888e+15
-8.8888888888888889e+16
-8.8888888888888889e+17
-9.9000000000000000e+00
-9.9900000000000000e+01
-9.9990000000000000e+02
-9.9999000000000000e+03
-9.9999900000000000e+04
-9.9999990000000000e+05
-9.9999999000000000e+06
-9.9999999900000000e+07
-9.9999999990000000e+08
-9.9999999999000000e+09
-9.9999999999900000e+10
-9.9999999999990000e+11
-9.9999999999999000e+12
-9.9999999999999900e+13
-9.9999999999999990e+14
-9.9999999999999999e+15
-1.00000000000000000e+17
-1.00000000000000000e+18
*** STOP - ConvertReal10CTE ***
1.00000000000000000e-01
1.00000000000000000e-02
1.00000000000000000e-03
1.00000000000000000e-04
1.00000000000000000e-05
1.00000000000000000e-06
1.00000000000000000e-07
1.00000000000000000e-08
1.00000000000000000e-09
1.00000000000000000e-10
1.00000000000000000e-11
1.00000000000000000e-12
1.00000000000000000e-13
1.00000000000000000e-14
1.00000000000000000e-15
1.00000000000000000e-16
1.00000000000000000e-17
1.00000000000000000e-18
*** STOP - ConvertReal10CTE ***
2.0000000000000000e-01
2.0000000000000000e-02
2.0000000000000000e-03
2.0000000000000000e-04
2.0000000000000000e-05
2.0000000000000000e-06
2.0000000000000000e-07
2.0000000000000000e-08
2.0000000000000000e-09
2.0000000000000000e-10
2.0000000000000000e-11
2.0000000000000000e-12
2.0000000000000000e-13
2.0000000000000000e-14
2.0000000000000000e-15
2.0000000000000000e-16
2.0000000000000000e-17
2.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
3.0000000000000000e-01
3.0000000000000000e-02
3.0000000000000000e-03
3.0000000000000000e-04
3.0000000000000000e-05
3.0000000000000000e-06
3.0000000000000000e-07
3.0000000000000000e-08
3.0000000000000000e-09
3.0000000000000000e-10
3.0000000000000000e-11
3.0000000000000000e-12
3.0000000000000000e-13
3.0000000000000000e-14
3.0000000000000000e-15
3.0000000000000000e-16
3.0000000000000000e-17
3.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
4.0000000000000000e-01
4.0000000000000000e-02
4.0000000000000000e-03
4.0000000000000000e-04
4.0000000000000000e-05
4.0000000000000000e-06
4.0000000000000000e-07
4.0000000000000000e-08
4.0000000000000000e-09
4.0000000000000000e-10
4.0000000000000000e-11
4.0000000000000000e-12
4.0000000000000000e-13
4.0000000000000000e-14
4.0000000000000000e-15
4.0000000000000000e-16
4.0000000000000000e-17
4.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
5.0000000000000000e-01
5.0000000000000000e-02
5.0000000000000000e-03
5.0000000000000000e-04
5.0000000000000000e-05
5.0000000000000000e-06
5.0000000000000000e-07
5.0000000000000000e-08
5.0000000000000000e-09
5.0000000000000000e-10
5.0000000000000000e-11
5.0000000000000000e-12
5.0000000000000000e-13
5.0000000000000000e-14
5.0000000000000000e-15
5.0000000000000000e-16
5.0000000000000000e-17
5.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
6.0000000000000000e-01
6.0000000000000000e-02
6.0000000000000000e-03
6.0000000000000000e-04
6.0000000000000000e-05
6.0000000000000000e-06
6.0000000000000000e-07
6.0000000000000000e-08
6.0000000000000000e-09
6.0000000000000000e-10
6.0000000000000000e-11
6.0000000000000000e-12
6.0000000000000000e-13
6.0000000000000000e-14
6.0000000000000000e-15
6.0000000000000000e-16
6.0000000000000000e-17
6.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
7.0000000000000000e-01
7.0000000000000000e-02
7.0000000000000000e-03
7.0000000000000000e-04
7.0000000000000000e-05
7.0000000000000000e-06
7.0000000000000000e-07
7.0000000000000000e-08
7.0000000000000000e-09
7.0000000000000000e-10
7.0000000000000000e-11
7.0000000000000000e-12
7.0000000000000000e-13
7.0000000000000000e-14
7.0000000000000000e-15
7.0000000000000000e-16
7.0000000000000000e-17
7.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
8.0000000000000000e-01
8.0000000000000000e-02
8.0000000000000000e-03
8.0000000000000000e-04
8.0000000000000000e-05
8.0000000000000000e-06
8.0000000000000000e-07
8.0000000000000000e-08
8.0000000000000000e-09
8.0000000000000000e-10
8.0000000000000000e-11
8.0000000000000000e-12
8.0000000000000000e-13
8.0000000000000000e-14
8.0000000000000000e-15
8.0000000000000000e-16
8.0000000000000000e-17
8.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
9.0000000000000000e-01
9.0000000000000000e-02
9.0000000000000000e-03
9.0000000000000000e-04
9.0000000000000000e-05
9.0000000000000000e-06
9.0000000000000000e-07
9.0000000000000000e-08
9.0000000000000000e-09
9.0000000000000000e-10
9.0000000000000000e-11
9.0000000000000000e-12
9.0000000000000000e-13
9.0000000000000000e-14
9.0000000000000000e-15
9.0000000000000000e-16
9.0000000000000000e-17
9.0000000000000000e-18
*** STOP - ConvertReal10CTE ***
-1.2345678912345600e+00
-1.23456789123456000e+01
-1.23456789123456000e+02
-1.2345678912345600e+03
-1.23456789123456000e+04
-1.23456789123456000e+05
-1.2345678912345600e+06
-1.23456789123456000e+07
-1.23456789123456000e+07
-1.23456789123456000e+08
-1.2345678911234560e+09
-1.23456789121234560e+10
-1.23456789123123456e+11
-1.2345678912341235e+12
-1.23456789123451235e+13
-1.23456789123456123e+14
-1.2345678912345671e+15
-1.23456789123456781e+16
-1.23456789123456789e+17
*** STOP - ConvertReal10CTE --- E N D ---***


Gunther
You have to know the facts before you can distort them.

Mikl__

boa tarde, RuiLoureiro,!
3.00GHz 3.49Gb RAM Pentium 4 (SSE4) (01.zip)
465 MHz, 256 Mb RAM Celeron (02.zip)
Este é um novo e mais rápido versão da função Eprst (New version Eprst); masm windows console #
include \masm32\include\masm32rt.inc
includelib \masm32\lib\kernel32.lib
extern _imp__SetPriorityClass@8:dword
extern _imp__GetCurrentProcess@0:dword
.686
.mmx
.xmm
.data
    _Real10_R dt ?
count1 dd 1000000
count2 dd ?
rdtsc_timer dq ?
timer1 dd ?
max_ten REAL10 1.0e+4931
.code
START_COUNTER_CYCLE_HIGH_PRIORITY_CLASS macro
                 call    _imp__GetCurrentProcess@0
                 push    HIGH_PRIORITY_CLASS ; dwPriorityClass
                 push    eax             ; hProcess
                 call    _imp__SetPriorityClass@8
                 xor     eax, eax
                 cpuid
                 rdtsc
                 push    edx
                 push    eax
                 mov     count2,1000000
                 xor     eax,eax
                 cpuid
                 lea     esp,[esp+0]
                 add     eax,0
@@:              sub     count2, 1
                 jnz     short @b
                 xor     eax, eax
                 cpuid
                 rdtsc
                 pop     ecx
                 sub     eax, ecx
                 pop     ecx
                 sbb     edx, ecx
                 push    edx
                 push    eax
                 xor     eax, eax
                 cpuid
                 rdtsc
                 push    edx
                 push    eax
                 mov     count2,1000000
                 xor     eax, eax
                 cpuid
                 lea     ecx, [ecx+0]
endm
main proc
LOCAL result[32]:BYTE

    fldpi
    fstp tbyte ptr _Real10_R
    START_COUNTER_CYCLE_HIGH_PRIORITY_CLASS
@@: lea eax,result
push eax
push offset _Real10_R
call Eprst
                 sub     count2, 1
                 jnz     @b
                 xor     eax, eax
                 cpuid
                 rdtsc
                 pop     ecx
                 sub     eax, ecx
                 pop     ecx
                 sbb     edx, ecx
                 pop     ecx
                 sub     eax, ecx
                 pop     ecx
                 sbb     edx, ecx
                 mov     dword ptr rdtsc_timer, eax
                 mov     dword ptr rdtsc_timer+4, edx
                 call    _imp__GetCurrentProcess@0
                 push    NORMAL_PRIORITY_CLASS ; dwPriorityClass
                 push    eax             ; hProcess
                 call    _imp__SetPriorityClass@8
                 finit
                 fild    rdtsc_timer
                 fild    count1
                 fdivp   st(1), st
                 fistp   timer1

print str$(timer1),13,10
    inkey " *** STOP - Eprst --- E N D ---*** "
    exit
   
main endp



    $max equ 90; <-- This number may be increased
    magic1 equ 4D10h;lg(2)*65536=19728,3...
    magic2  equ 35269h;log2(10)*65536=3,32192809488736234780*65536=217705,8796265381788254208..
.const
    cntr = -$max
    REPEAT 2*$max+1
        IF cntr NE 0
            REAL10 @CatStr(<1.0e>,%-cntr)
        ELSE
            tabs REAL10 1.0
        ENDIF
        cntr = cntr + 1
    ENDM

    table0  label word
n=0
rept 100
dw (n mod 10 shl 8)+(n/10)+"00"
n=n+1
endm   
    table1 dd shift0,shift1,shift2,shift3,shift4
.code
Eprst proc
;================================================
lpReal11 equ dword ptr [esp+16+buffer]
lpDest equ lpReal11+4
iExp equ dword ptr [esp-4]
aExp equ iExp-4
x equ aExp-4*3
temp1 equ x-4
temp2 equ temp1-4
buffer = 1Ch

push edi
push esi
push ebx
sub esp,buffer
fninit
        mov ecx,lpReal11
fld tbyte ptr [ecx]
mov edi,lpDest
mov ebx,[ecx]
mov aExp,0
mov eax,[ecx+4]
mov [x],ebx
movzx edx,word ptr [ecx+8]
mov [x+4],eax
mov [x+8],edx
cmp edx,8000h ;positive or negative number?
mov byte ptr [edi],'-'
sbb esi,esi   ;if positive esi=0FFFFFFFFh if negative esi=0
and esi,0Dh   ;if positive esi=0Dh if negative esi=0
sub [edi],esi ;if positive [edi]=" " if negative [edi]="-"
and edx,7FFFh ;fabs
jnz a2        ;normal or Infinity or SNAN or QNAN or Uncertainty
Zero_Or_Denormal_or_Normal: cmp edx,eax
jnz Denormal_or_Normal
        cmp ebx,eax
jnz Denormal_or_Normal
mov dword ptr [edi+1],'oreZ'
mov ebx,[esp+buffer];pop ebx
mov dword ptr [edi+5],0
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
        retn 8
Denormal_or_Normal: test eax,80000000h
jnz _Normal
Denormal:fld max_ten  ;st(0)=1.0e+4931
mov aExp,-4931*2
fmul                  ;normalization
fld st
fstp tbyte ptr x
mov ebx,[x]
mov eax,[x+4]
mov edx,[x+8]
jmp _Normal
a2: cmp edx,7FFFh
jz Infinity_Or_SNAN_Or_QNAN_Or_Uncertainty
_Normal:mov esi,10
sub edx,16383
mov word ptr [edi+21],'+E'
imul edx,magic1
and edx,0FFFF0000h
sar edx,15
mov iExp,edx
jz @f
cmp edx,2*$max
jg a1
cmp edx,-2*$max
jge load
;------------------------------------------------
sub edx,1
a1: neg edx;
sar edx,1
mov temp1,edx
imul edx,magic2
sar edx,16
mov temp2,edx
fild temp2         ; get the characteristic
fild temp1         ; log2(10)*expscale
fldl2t    ; log2(10)
        fmul               ; log2(10)*expscale
        fsub st,st(1)      ; get only the mantissa but keep the characteristic
        f2xm1              ; 2^(mantissa)-1
        fld1
        fadd               ; add 1 and pop
        fscale
        fstp    st(1)      ; remove the characteristic
        jmp multiply
load: fld tabs[edx+edx*4]
multiply:fmul              ; X * 10^expscaleS
fld st
fstp tbyte ptr x
xor edx,edx
@@: mov ecx,[x+8]
mov ebx,[x]
        mov eax,[x+4]
and ecx,7FFFh
sub ecx,16382
cmp ecx,4
ja shift0
jmp table1[ecx*4]
shift4::test eax,60000000h
jz a6
fld tabs[10]
fmul
add iExp,2
fstp tbyte ptr x
mov eax,[x+4]
        mov ebx,[x]
shld edx,eax,1
shld eax,ebx,1
shl ebx,1
add ebx,4
jmp shift0
a6: shld edx,eax,4 ;ecx=1 ebx+4
shld eax,ebx,4 ;ecx=2 ebx+8
shl ebx,4      ;ecx=3 ebx+9
add ebx,12     ;ecx=4 ebx+12
jmp shift0
shift3::shld edx,eax,3
shld eax,ebx,3
shl ebx,3
add ebx,9;10
jmp shift0
shift2::shld edx,eax,2
shld eax,ebx,2
shl ebx,2
add ebx,8
jmp shift0
shift1::shld edx,eax,1
shld eax,ebx,1
shl ebx,1
add ebx,4
shift0::adc eax,0
adc edx,0
mov [edi+1],dl
mov byte ptr [edi+2],','
or byte ptr [edi+1],'0'
   
k=3
    REPEAT 17
        mul esi
        mov [edi+k],dl
        mov ecx,eax
        mov eax,ebx
        mul esi
        add ecx,edx
        adc byte ptr [edi+k],'0'
        mov ebx,eax
        mov eax,ecx
k=k+1
    ENDM

mul esi
mov [edi+k],dl
mov ecx,eax
mov eax,ebx
mul esi
add ecx,edx
adc byte ptr [edi+k],'0'
;--------------------------------------
mov eax,iExp
add eax,aExp
mov edx,eax
sar eax,1
sar edx,31
mov ecx,esi
xor eax,edx
sub eax,edx
and edx,2
add byte ptr [edi+22],dl
mov esi,eax
mov edx,42949673;2^32/100
mul edx
mov eax,dword ptr table0[edx*2] ;edx = quotient of the division by 100
mov dword ptr [edi+23],eax
lea eax,[edx*4]
shl edx,2
lea edx,[edx+edx*2]
lea edx,[eax+edx*8] ;edx = quotient*100
sub esi,edx;esi = remainder of the division by 100
mov eax,dword ptr table0[esi*2]
mov dword ptr [edi+25],eax
mov ebx,[esp+buffer];pop ebx
mov dword ptr [edi+27],0
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
retn 8
Infinity_Or_SNAN_Or_QNAN_Or_Uncertainty:
cmp eax,80000000h
jnz SNAN_Or_QNAN_Or_Uncertainty
and ebx,ebx
jnz SNAN_Or_QNAN_Or_Uncertainty
        mov dword ptr [edi+1],'ifnI'
mov ebx,[esp+buffer];pop ebx
        mov dword ptr [edi+5],'ytin'
        mov dword ptr [edi+9],0
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
ret 8
SNAN_Or_QNAN_Or_Uncertainty:
test eax,eax
jns error
test eax,40000000h
jnz QNAN
        mov dword ptr [edi+1],'ngiS'
mov ebx,[esp+buffer];pop ebx
        mov dword ptr [edi+5],'N la'
        mov dword ptr [edi+9],'a no'
        mov dword ptr [edi+13],'muN '
        mov dword ptr [edi+17],'reb'
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
ret 8
QNAN: test eax,3FFFFFFFh
jnz @f
test ebx,ebx
jnz @f
        mov dword ptr [edi+1],'ecnU'
        mov dword ptr [edi+5],'iatr'
mov ebx,[esp+buffer];pop ebx
        mov dword ptr [edi+9],'ytn'
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
ret 8
@@: mov dword ptr [edi+1],'eiuQ'
        mov dword ptr [edi+5],'oN t'
mov ebx,[esp+buffer];pop ebx
        mov dword ptr [edi+9],' a n'
        mov dword ptr [edi+13],'bmuN'
        mov dword ptr [edi+17],'re'
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
ret 8
error: mov dword ptr [edi+1],'orrE'
mov ebx,[esp+buffer];pop ebx
        mov dword ptr [edi+5],'r'
mov esi,[esp+buffer+4];pop esi
mov edi,[esp+buffer+8];pop edi
add esp,buffer+12
ret 8
Eprst endp
end main
and describe the contents of macro "SAVE_COUNTER_CYCLE" as the asm-file please

Gunther

Hi Mikl__,

could you include the running program, please? The images are interesting, but results will be different from machine to machine.

Gunther
You have to know the facts before you can distort them.

Mikl__

Hi, Gunther!
Tell me please how you sent the results of TestCycles10_18E.exe -- in command line write "TestCycles10_18E > 1.txt" ? The TestCycles10_18E.exe and other programs are waiting when I press to any key with black skreen and I don't know is ready results or isn't ready. The pictures are results of printscreen of program TestCycles10_18E.exe

dedndave

you can right-click on the console window, then Select All
then paste into the reply window
sometimes, i have to do it twice before it works   :redface:
then, i edit out the stuff i don't want, like the Microsoft Windows version and the command prompt

what he wants is the ASM and EXE files, though
put them in a ZIP file and attach them to the reply

Mikl__

Hi, dedndave! Thank you very much!!! :t