MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Use MATLAB to convert a scalar double into a half-precision floating point. The return value should be a uint16.

The half-precision floating point format is specified here, and is the source for much of the test suite:

http://en.wikipedia.org/wiki/Half-precision_floating-point_format

This is an implementation in C if you want some inspiration to get started:

As other problems related to half-precision are added, I will try to link them here.

5 correct solutions
6 incorrect solutions

Last solution submitted on Nov 23, 2013

1 player likes this solution

1 Comment