]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle x == +-0 as a special case since expm1(-0) == -0.
authorUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:21:13 +0000 (03:21 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 20 Mar 1997 03:21:13 +0000 (03:21 +0000)
sysdeps/libm-i387/s_expm1.S
sysdeps/libm-i387/s_expm1f.S
sysdeps/libm-i387/s_expm1l.S

index e1b198d604e3278ba9d4972c44ba3c7d5563318d..92beaf0776e408faf03586b588f510a8e27c38b8 100644 (file)
@@ -51,15 +51,17 @@ ENTRY(__expm1)
        fldl    4(%esp)         // x
        fxam                    // Is NaN or +-Inf?
        fstsw   %ax
+       movb    $0x45, %ch
+       andb    %ah, %ch
+       cmpb    $0x40, %ch
+       je      3f              // If +-0, jump.
 #ifdef PIC
        call    1f
 1:     popl    %edx
        addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
 #endif
-       movb    $0x45, %ch
-       andb    %ah, %ch
        cmpb    $0x05, %ch
-       je      2f              // Is +-Inf, jump.
+       je      2f              // If +-Inf, jump.
 
        fldt    MO(l2e)         // log2(e) : x
        fmulp                   // log2(e)*x
index 8626fee45db96d8f2e82433117f3dd4bb4d4bb27..45a60fe010e9b8ea1b61b328f11bf8d38f444905 100644 (file)
@@ -51,15 +51,17 @@ ENTRY(__expm1f)
        flds    4(%esp)         // x
        fxam                    // Is NaN or +-Inf?
        fstsw   %ax
+       movb    $0x45, %ch
+       andb    %ah, %ch
+       cmpb    $0x40, %ch
+       je      3f              // If +-0, jump.
 #ifdef PIC
        call    1f
 1:     popl    %edx
        addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
 #endif
-       movb    $0x45, %ch
-       andb    %ah, %ch
        cmpb    $0x05, %ch
-       je      2f              // Is +-Inf, jump.
+       je      2f              // If +-Inf, jump.
 
        fldt    MO(l2e)         // log2(e) : x
        fmulp                   // log2(e)*x
index 46290ca4a9eb22836d5a4938a8433b64adf3cdbc..13fa698cc79d0ab4b6ff10be4d1e6f521ce94e70 100644 (file)
@@ -51,15 +51,17 @@ ENTRY(__expm1l)
        fldt    4(%esp)         // x
        fxam                    // Is NaN or +-Inf?
        fstsw   %ax
+       movb    $0x45, %ch
+       andb    %ah, %ch
+       cmpb    $0x40, %ch
+       je      3f              // If +-0, jump.
 #ifdef PIC
        call    1f
 1:     popl    %edx
        addl    $_GLOBAL_OFFSET_TABLE_+[.-1b], %edx
 #endif
-       movb    $0x45, %ch
-       andb    %ah, %ch
        cmpb    $0x05, %ch
-       je      2f              // Is +-Inf, jump.
+       je      2f              // If +-Inf, jump.
 
        fldt    MO(l2e)         // log2(e) : x
        fmulp                   // log2(e)*x