Hawk Logo

Hawk Software

Programming, web design, and more

Recent Posts

Category

Archives

Meta

Tools every web developer should have

Programming, Web Design Comments Off

I was a programmer first, then a web developer, and I think it might give others like myself an advantage at times.  In this day of WYSIWYG web page editors, templates, and content management systems (CMS), many web developers never get intimate with the actual HTML/XHTML code anymore.  Sure, they might look in the code window from time to time, but many totally rely on their editor/CMS to take care of the details.  That is, until things suddenly go wrong or they need to perform a site-wide change that cannot be easily implemented by altering the style sheet or the include files.  It is times like these that don’t phase me, because I always have diff and search-and-replace tools at the ready. Read the rest of this entry »

The new C11 standard, and how it will affect HawkThreads

Programming Comments Off

I had not been following the status of the proposed C1x standard very closely, so I was surprised when I read on Dr. Dobb’s Journal that C11 had been completed late last year by ISO/IEC.  Finally, as C compilers are updated to the new standard, C programmers will be able to make portable threaded programs without using an external library to support Unix-like systems and Windows.  Of course, don’t hold your breath for Microsoft to fully support C11; they still don’t fully support C99!

So, how does this effect HawkThreads?  I had been planning to deprecate the HawkThreads API because I felt that yet-another-thread-library was not in the best long-term interest of my projects.  I had planned to just use Posix threads, and force Windows developers to use Pthreads-w32 (a very good implementation, but it requires an extra DLL), but I have other thoughts now. Read the rest of this entry »

Status and direction for HawkNL library

News, News HawkNL Comments Off

First, for the many users of the HawkNL 1.x series, after over seven years of inactivity I am working on a new 1.7 beta update which will fix some recently discovered endian and 64-bit OS issues.  The update will also contain an update to HawkThreads which I created in 2006 but never released.

It is interesting that I had already discovered a way to avoid the 64-bit issues in my preliminary work on HawkFloat, so that part is easy.  I think it is also finally time to switch over to the GPL 3.o, and all my new projects will use this almost 5-year old license (how time flies!).

Now to HawkNL 2.0:

Read the rest of this entry »

Fast software floating point code – Part 2

Programming Comments Off

If you have not already read part 1, do so now to set the stage. . .

A floating point number is composed of three parts: the sign bit, the exponent, and the mantissa (or significand). I will represent these as S, E, and M, respectively. The IEEE float is composed of a sign bit, 8 bits for exponent, and 23 bits for the mantissa (1S-8E-23M). The IEEE double float is 1S-11E- 52M, and the IEEE half float is 1S-5E-10M.

The Small Floating Point (SFP) format is 8E-1S-7M (note the order). It preserves the 8 bits of exponent from the IEEE float, and moves the sign bit next to the mantissa, thus creating a natural break along a byte boundary. Preserving the byte boundaries helps to reduce the number of masking and shifting operations in a software implementation. Read the rest of this entry »

Happy Pi Day!

Programming Comments Off

3.141592653589793238462643383279502884197169399375105820974944592307816406286 208998628034825342117067982148086513282306647093844609550582231725359408128481 117450284102701938521105559644622948954930381964428810975665933446128475648233 Read the rest of this entry »