Startseite › Sprach-Frontends › C Frontend › Übersicht Hilfe zum PBXB64-Compiler

PBXB64 - long double

On PBXB64 the long double type is a 64-bit IEEE-754 floating-point type with the same size, alignment, and calling convention as double. This provides full source compatibility with standard C code while reusing the existing SSE float backend.

Kategorie: Übersicht

Beschreibung

On PBXB64 the long double type is a 64-bit IEEE-754 floating-point type with the same size, alignment, and calling convention as double. This provides full source compatibility with standard C code while reusing the existing SSE float backend.

Characteristics

PropertyValue
Size8 bytes
Alignment8 bytes
BackendSSE2 double
Literal suffixL or l

Notes

Limitation: 80-bit x87 long double and the associated math.h long-double functions (sinl, cosl, etc.) are not available.

Back to C Language Reference

Beispiel

#include <stddef.h>

long double area(long double r) {
    long double pi = 3.14159265358979323846L;
    return pi * r * r;
}

int main(void) {
    long double a = area(2.0L);
    return (a == 12.566370614359172L) ? 0 : 1;
}