Changeset 1181


Ignore:
Timestamp:
Mar 30, 2012, 10:48:45 AM (11 years ago)
Author:
sam
Message:

math: add a few comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/math/half.cpp

    r1180 r1181  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    4141/* Lookup table-based algorithm from “Fast Half Float Conversions”
    4242 * by Jeroen van der Zijp, November 2008. No rounding is performed,
    43  * and some NaN values may be incorrectly converted to Inf. */
     43 * and some NaN values may be incorrectly converted to Inf (because
     44 * the lowest order bits in the mantissa are ignored). */
    4445static inline uint16_t float_to_half_nobranch(uint32_t x)
    4546{
     
    158159#endif
    159160
     161/* We use this De Bruijn sequence to compute a branchless integer log2 */
    160162static int const shifttable[32] =
    161163{
Note: See TracChangeset for help on using the changeset viewer.