C++ Weekly - Ep 228 - C++20's (High Precision) Mathematical Constants

preview_player
Показать описание
☟☟ Awesome T-Shirts! Sponsors! Books! ☟☟

Upcoming Workshop: Applied constexpr: The Power of Compile-Time Resources, C++ Under The Sea, October 10, 2024

T-SHIRTS AVAILABLE!

WANT MORE JASON?

SUPPORT THE CHANNEL

GET INVOLVED

JASON'S BOOKS

► C++23 Best Practices

► C++ Best Practices

JASON'S PUZZLE BOOKS

► Object Lifetime Puzzlers Book 1

► Object Lifetime Puzzlers Book 2

► Object Lifetime Puzzlers Book 3

► Copy and Reference Puzzlers Book 1

► Copy and Reference Puzzlers Book 2

► Copy and Reference Puzzlers Book 3

► OpCode Puzzlers Book 1


RECOMMENDED BOOKS

AWESOME PROJECTS

O'Reilly VIDEOS

Рекомендации по теме
Комментарии
Автор

While this is certainly a great addition, I think the "real deal" for the math library would be to have constexpr <cmath> functions. This would be very handy to generate trigonometric tables at compile time or pre-calculating vector lengths or unit vectors.

benoitrousseau
Автор

3.1415... that's all. New item on bucket list: Memorize at least 10 decimal places of pi.

simonbeer
Автор

Seems like the audio on this one is a bit broken.

ianpan
Автор

3 more digits of precision! All of the precision!

sucidity
Автор

Sound good. But im wondering why do we need the extra _v versions of these constants?
You could simply define them with a default template type. So you can just use std::numbers::pi as well as std::numbers::pi<long double>. Which in my opinion looks a bit nicer.

MegaKillzor
Автор

I would like to see compilers map some of these constants into the built-in chip constants (Intel as PI and a few others) for maximum precision

stephenhowe
Автор

Hello. As you have made these playlists that are tutorials for cpp 20 and 17... Is there a chance you will do playlists for cpp 11 and 14? Thanks a lot!

nickst
Автор

Хм, почему я это пропустил мимо ушей и всё это время использовал старые константы?

VladykaVladykov
Автор

Anyone else having crackles in the audio on this one?

NimelrianSC
Автор

Are those generic templates doing calculations at compile time or just a bunch of constants for well known types? E.g. how to get pi for a user defined floating point type?

petermuller
Автор

The dislikes are people using 4.*atan(1.)

jakubgaecki
Автор

But who is righticus is the real question...

vertigo
Автор

Given stuff I'm hearing with my naive ears around L1 cache, I wonder if there are things to do to make such pieces more L1 cache compatible?

xenocampanoli