ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.pod
(Generate patch)

Comparing libecb/ecb.pod (file contents):
Revision 1.57 by root, Thu Oct 16 14:47:20 2014 UTC vs.
Revision 1.58 by root, Thu Oct 16 15:01:54 2014 UTC

373 373
374=head2 OPTIMISATION HINTS 374=head2 OPTIMISATION HINTS
375 375
376=over 4 376=over 4
377 377
378=item bool ecb_is_constant(expr) 378=item bool ecb_is_constant (expr)
379 379
380Returns true iff the expression can be deduced to be a compile-time 380Returns true iff the expression can be deduced to be a compile-time
381constant, and false otherwise. 381constant, and false otherwise.
382 382
383For example, when you have a C<rndm16> function that returns a 16 bit 383For example, when you have a C<rndm16> function that returns a 16 bit
685 /* this results in a single add instruction to toggle the bit, and 4 extra */ 685 /* this results in a single add instruction to toggle the bit, and 4 extra */
686 /* instructions to move the float value to an integer register and back. */ 686 /* instructions to move the float value to an integer register and back. */
687 687
688 x = ecb_binary32_to_float (ecb_float_to_binary32 (x) ^ 0x80000000U) 688 x = ecb_binary32_to_float (ecb_float_to_binary32 (x) ^ 0x80000000U)
689 689
690=item float ecb_binary16_to_float (uint16_t x) [-UECB_NO_LIBM]
691
690=item float ecb_binary32_to_float (uint32_t x) [-UECB_NO_LIBM] 692=item float ecb_binary32_to_float (uint32_t x) [-UECB_NO_LIBM]
691 693
692=item double ecb_binary32_to_double (uint64_t x) [-UECB_NO_LIBM] 694=item double ecb_binary32_to_double (uint64_t x) [-UECB_NO_LIBM]
693 695
694The reverse operation of the previos function - takes the bit representation 696The reverse operation of the previos function - takes the bit
695of an IEEE binary32 or binary64 number and converts it to the native C<float> 697representation of an IEEE binary16, binary32 or binary64 number and
696or C<double> format. 698converts it to the native C<float> or C<double> format.
697 699
698This function should work even when the native floating point format isn't 700This function should work even when the native floating point format isn't
699IEEE compliant, of course at a speed and code size penalty, and of course 701IEEE compliant, of course at a speed and code size penalty, and of course
700also within reasonable limits (it tries to convert normals and denormals, 702also within reasonable limits (it tries to convert normals and denormals,
701and might be lucky for infinities, and with extraordinary luck, also for 703and might be lucky for infinities, and with extraordinary luck, also for

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines