Loading...

What's up with Half.MaxValue in .NET?

What's up with Half.MaxValue in .NET?

In this episode of .NET Deep Dives, Ian Griffiths explores the peculiar behaviour of the half-precision floating point type.

By using the simplicity of a C# program that prints an incorrect maximum value for this type, the video explains floating point representation intricacies, especially with 16-bit values. It delves into the concept of precision and range, illustrating the vast differences between single, double, and half-precision floats. The discussion clarifies .NET's formatting behaviour, which rounds half-precision values to avoid spurious precision in display, leading to seemingly wrong output.

Endjin are proud to be a .NET Foundation Corporate Sponsor, as we are maintainers of Reactive Extensions for .NET (AKA ReactiveX AKA Rx.NET) which is one of the most well established and widely used open source .NET projects.

Published on:

Learn more
Need help with this product?

We can help you with What's up with Half.MaxValue in .NET?

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

endjin.com
endjin.com

We help small teams achieve big things.

Share post:

Related posts

An overview of Reaqtor AKA Cloud Native Rx

Endjin, a .NET Foundation Corporate Sponsor, maintains Reactive Extensions for .NET and Reaqtor - two key components of the .NET Foundation, a...

3 years ago

Glenn Condron: .NET Web Development - Episode 293

This episode features an interview with Glenn Condron, Principal Product Manager for the App Platform team within the Developer Division at Mi...

2 years ago

How .NET 9.0 boosted JSON Schema performance by 32%

We benchmarked endjin's JSON Schema library on .NET 9.0 and saw large performance gains. There are even more gains to be had with new System.T...

1 year ago

C# Source Generators Boost Productivity in the Rx.NET Repo

Code generation has become increasingly important in recent versions of .NET, especially when using AOT compilation. But they can also play a ...

1 year ago

How .NET 9.0 boosted AIS.NET performance by 9%

.NET 9.0 has shipped, and for the fourth year running, we benchmarked endjin's AIS.NET library and were very happy to see substantial performa...

1 year ago

David Pine: NET Content Development - Episode 223

In this episode of the Architect Tips podcast, David Pine, Developer Relations specialist at Microsoft and expert in Web Technologies, discuss...

3 years ago

Modernizing Reactive Extensions for .NET

Endjin are proud to be a .NET Foundation Corporate Sponsor, as we are maintainers of Reactive Extensions for .NET (AKA ReactiveX AKA Rx.NET) w...

2 years ago

High Performance JSON Serialization With Code Generation on C# 11 and .NET 7.0

Looking for ways to improve the parsing and generation of JSON data in your .NET applications? This talk showcases how recent features added t...

2 years ago

Json Schema Patterns in .NET - Open vs. Closed Types

This post provides insights into some common patterns in C# and JSON Schema design. Specifically, it examines the crucial concept of object ex...

2 years ago

Mitchel Sellers: Architecting .NET MAUI - Episode 254

In this episode of the podcast, Mitchel Sellers, a 15-time Microsoft MVP, talks about .NET MAUI and its architecture standards, performance, s...

3 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.