Programming vlog 0x01 - Figuring out fixed point maths

https://makertube.net/w/tagc6Wccar1G4ZZT69F1mk

Programming vlog 0x01 - Figuring out fixed point maths

PeerTube

If you've ever wrestled with fixed-point math, scaling, and rounding, this blog post is for you!

I go deeper into binary arithmetic, division tricks, rounding, and what it really takes to build fixed-point systems that work.

As always, I appreciate all of your feedback and corrections.

https://shafq.at/fixed-point-tutorial-2.html

#EmbeddedSystems #DSP #FixedPoint #CProgramming #SignalProcessing #Microcontrollers #C #programming

Fixed-Point Tutorial #2

Introduction I've received a lot of feedback on my blog posts over the past few months. I'm humbled and grateful for the suggestions, and I always look forward to hearing from readers. You'll often see that I leave my mistakes in the posts along with the corrections, giving credit where …

Ayan Shafqat

Числа с фиксированной запятой для NES/DENDY

Консоль Dendy в первую очередь ассоциируется с относительно простыми играми (Super Mario Bros, Duck Hunt, Battle City и т. д.), которые обычно не требуют сложных расчётов и обходятся целочисленной математикой. Но как только нужно сделать трёхмерную графику или сложную физику, сразу появляется потребность в точных вычислениях и дробных числах. Самым простым и быстрым способом программного представления дробей являются числа с фиксированной запятой (Fixed‑point числа). О реализации такой арифметики для NES/Dendy мы и поговорим.

https://habr.com/ru/companies/sberbank/articles/850348/

#c #assembler #python #разработка_игр #nes #dendy #gamedev #ретроконсоли #математика #fixedpoint

Числа с фиксированной запятой для NES/DENDY

Консоль Dendy в первую очередь ассоциируется с относительно простыми играми (Super Mario Bros, Duck Hunt, Battle City и т. д.), которые обычно не требуют сложных расчётов и...

Хабр
AI models fed AI-generated data quickly spew nonsense
Researchers gave successive versions of a large language model information produced by previous generations of the AI — and observed rapid collapse.
From: https://www.nature.com/articles/d41586-024-02420-7?WT.ec_id=NATURE-20240801

Not to dunk on this research, which I think is interesting and important, but if you've ever explored iterated function systems, discrete dynamical systems, fractals or the like, this is a wholly unsurprising observation. A general class of observations is that repeatedly iterating a function on a given input will diverge from that input and start assuming qualities reflective of the function itself.

For instance, watch some of the videos on this page: https://www.algorithm-archive.org/contents/barnsley/barnsley.html . In one set, you'll see a square with randomly-placed dots being squished down into various shapes. In another set, you'll see the Barnsley fern itself run through the same functions being squished down to roughly the same shapes. This is a general fixed-point result of this (and all contractive affine) systems: any input set of points will be squished into the same shapes, and precisely the same fern image will emerge no matter what (non-empty) input you start with when you iterate these processes often enough (by iterate I mean feeding the output of the functions back in as input, as in the linked paper). This is an instance of the Banach fixed-point theorem applied to the Hausdorff metric on images; the theorem states that any self-map that's contractive in the metric has a unique fixed point. In this case, the unique fixed point is the fern image; the map being iterated is a bit complicated but detailed on that linked page about the fern. The theorem tells us this unique fixed point is dependent only on the self-map, not on what input is put in.

Naturally #GenerativeAI training and input-output procedures are considerably more complicated than affine functions, but the same class of fixed point phenomena are almost surely at play, especially for the image-generating ones. Personally I'd find it surprising and interesting if there weren't fixed point theorems like this for #GenerativeAI systems trained on their own outputs.

#ContractionMap #FixedPoint #Fractals #AI #GenAI

AI models fed AI-generated data quickly spew nonsense

Researchers gave successive versions of a large language model information produced by previous generations of the AI — and observed rapid collapse.

Имплементация чисел с фиксированной точкой (часть 2)

Итак, в прошлый раз я представил базовую идею как можно реализовать Fixed-point arithmetic , а так же набросок кода на C++, в котором в комментариях нашли довольно много проблем (а я сам нашёл ещё больше). В этот раз хочется представить улучшенную реализацию, разбор тонких моментов в коде и провести более детальный анализ получаемых результатов.

https://habr.com/ru/articles/832258/

#fixedpoint_arithmetic #fixedpoint #fixed_point

Имплементация чисел с фиксированной точкой (часть 2)

Итак, в прошлый раз я представил базовую идею как можно реализовать Fixed-point arithmetic , а так же набросок кода на C++, в котором в комментариях нашли довольно много проблем (а я сам нашёл ещё...

Хабр
Fixed Point Math Exposed

If you are used to writing software for modern machines, you probably don’t think much about computing something like one divided by three. Modern computers handle floating point quite well. …

Hackaday

#Journal, Day 1452
Sunday, 10 March 2024
Ukraine War: Day 747
Hamas-Israel War: Day 155
Mass shootings in the USA in 2024: 73

#OscarSunday #Timechange #rescuebird #budgie #birthdays #familyandfriends #fixedpoint

I wrote a chunk of #bitshifting and #bitmask-ing #code today that turned out to be utterly useless, but I had so much fun writing it! Plus, getting to #grok #iee754 was neat-o.

#computerengineering #embedded #floatingpoint #fixedpoint

Need to use #fixedpoint numbers on your #embedded target because it lacks a #FPU
Don't like using clunky C libraries to chain function calls if you just want to do some basic math?
Care about #performance?

Then this might be for you:
<https://github.com/thacks42/fixed_point_math>

Supports #floatingpoint literals,
all basic arithmetic operations,
boolean expressions,
and more!

try it out on godbolt:
<https://godbolt.org/z/1qr631MKe>

GitHub - thacks42/fixed_point_math: a templated header-only fixed point math library for C++

a templated header-only fixed point math library for C++ - GitHub - thacks42/fixed_point_math: a templated header-only fixed point math library for C++

GitHub
#FICS23 (International Workshop on Fixed Points in Computer Science), which runs alongside #CSL2023 , "is to bring together people from different fields such as algebra/coalgebra, verification, logic, around the thematic of fixed points". No proceedings, but "Depending on the nature of the contributions, a special issue of #FundamentaInformaticae might be published with selected contributions". #FixedPoint I couldn't find a website but here is a web link to the call: https://sympa.inria.fr/sympa/arc/coq-club/2022-11/msg00032.html
coq-club - [Coq-Club] FICS'23: Call for Contributions - Fixed Points in Computer Science (CSL'23 workshop 17 feb 2023) - arc