<commit_before>#include "picasso.h"

// f24 has:
//  - 1 sign bit
//  - 7 exponent bits
//  - 16 mantissa bits
uint32_t f32tof24(float f)
{
	uint32_t i;
	std::memcpy(&i, &f, sizeof(f));

	uint32_t mantissa = (i << 9) >>  9;
	int32_t  exponent = (i << 1) >> 24;
	uint32_t sign     = (i << 0) >> 31;

	// Truncate mantissa
	mantissa >>= 7;

	// Re-bias exponent
	exponent = exponent - 127 + 63;
	if (exponent < 0)
	{
		// Underflow: flush to zero
		return sign << 23;
	}
	else if (exponent > 0x7F)
	{
		// Overflow: saturate to infinity
		return (sign << 23) | (0x7F << 16);<commit_msg>Fix compilation error after d1a1c0a0<commit_after>#include "picasso.h"

// f24 has:
//  - 1 sign bit
//  - 7 exponent bits
//  - 16 mantissa bits
uint32_t f32tof24(float f)
{
	uint32_t i;
	memcpy(&i, &f, sizeof(f));

	uint32_t mantissa = (i << 9) >>  9;
	int32_t  exponent = (i << 1) >> 24;
	uint32_t sign     = (i << 0) >> 31;

	// Truncate mantissa
	mantissa >>= 7;

	// Re-bias exponent
	exponent = exponent - 127 + 63;
	if (exponent < 0)
	{
		// Underflow: flush to zero
		return sign << 23;
	}
	else if (exponent > 0x7F)
	{
		// Overflow: saturate to infinity
		return (sign << 23) | (0x7F << 16);
{'fraction_non_alphanumeric': 0.16526138279932545, 'fraction_numerical': 0.07925801011804384, 'mean_word_length': 2.674922600619195, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4303857', 'n_tokens_mistral': 584, 'n_tokens_neox': 499, 'n_words': 141}