assembly - Is x87 FP stack still relevant? -
i notice compilers generate code targets simd registers every time double
arithmetic used. applies non-optimized optimized code. mean x87 fp unit can considered obsolete , nowadays backward compatibility?
i notice other "popular" platforms rely on respective simd implementations rather fp designed stack.
also simd implementations tend @ to the lowest degree 128bit wide, wonder mean (internal) precision of operations higher x87 fp unit?
i wonder performance, throughput , latency, considering simd has been conceived vector execution in mind, wonder how scalars.
also simd implementations tend @ to the lowest degree 128bit wide, wonder mean (internal) precision of operations higher x87 fp unit?
the width of simd register not width of 1 individual component of vector represents. available simd instruction sets offer @ ieee 754 binary64 format (64-bit wide). not historical 80-bit extended format precision or range.
many c compilers create 80-bit format available long double
type. utilize often. utilize intermediate computations: using contributes create end result more accurate if end result destined returned binary64 double
. 1 illustration function in this question, mathematically intuitive property holds of final result if intermediate computations done long double
, not if intermediate computations done same double
type inputs , output.
similarly, among many constraints had balanced in selection of parameters extended 80-bit format, 1 consideration is perfect compute binary64 function pow()
composing 80-bit expl()
, logl()
. precision necessary in order obtain accuracy end-result.
i should note, however, when “intermediate” computations single basic operation, improve not go through extended precision. in other words, when x
, y
of type double
, accuracy of (double)(x * (long double)y)
worse accuracy of x * y
. 2 expressions produce same results, , in rare cases differ, x * y
more accurate. phenomenon called double-rounding.
assembly floating-point stack obsolete x87
No comments:
Post a Comment