#fixedpoint

2025-03-30

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.

shafq.at/fixed-point-tutorial-

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

Engineer busy designing something with a slide rule. AI Generated Image.
2024-10-14

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

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

habr.com/ru/companies/sberbank

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

2024-08-01
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

2024-07-29

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

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

habr.com/ru/articles/832258/

#fixedpoint_arithmetic #fixedpoint #fixed_point

Brain Dynamics Toolboxbdtoolbox@mastodon.au
2024-06-07

The classic #HodgkinHuxley nerve #ActionPotential. In this case a #LimitCycle co-exists with a #FixedPoint. #Bistability is revealed by hysteresis when the injection current is ramped up and down. #ComputationalNeuroscience simulated with the #BrainDynamicsToolbox.

Finder of Impossible Thingsjt_omalley@universeodon.com
2024-03-11

#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

Wilson J. Holmeswilsonjholmes
2023-07-12

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

2023-02-09

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:
<github.com/thacks42/fixed_poin>

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

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

screenshot of a godbolt compiler output showing the assembly generated for a simple addition example as well as a slightly more complex calculation.
2022-11-22

#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: sympa.inria.fr/sympa/arc/coq-c

Nafnlaus 🇮🇸 🇺🇦nafnlaus@fosstodon.org
2022-11-20

Now, rise-over-run, that's a #FloatingPoint operation.
But *of course* you can't do that. You're running on a single-threaded #CPU (no #GPU) with no lookahead; everything blocks, and floating point ops block for a LONG time. So instead you're going to have integers mimick floating point (#FixedPoint)

Okay, so you check to see when they're going over a certain remainder value and you should move up or down one row of #pixels? OF COURSE you don't have time for that.

2022-11-15

Hello! My brief #introduction: I'm a professor of #economics and a #publicpolicy scholar at Rice U. I use #math modeling to inform science-based policy. I work on the economics of emerging infectious diseases, climate and the energy transition, and using #gametheory to study symbiotic relationships in #ecology. In #math I am interested in #topology and have studied #fixedpoint theorems for locally contractive set-valued maps. I enjoy travel, kayaking, reading, and dreaming of classic cars.

All about Adaada_ru@diode.zone
2022-08-06

Типы с фиксированной точкой в Аде

diode.zone/videos/watch/3edbd6

2021-01-15

@JordiGH

Aha! I finished searching and found a fixed-point triplet that isn't associative under multiplication like the floating point one you gave for addition! :D

If the fixed-denominator is 16

(8/16 * 11/16) * 9/16 =? 8/16 * (11/16 * 9/16)

Left-hand side:
(8/16 * 11/16) * 9/16
(88/16)/16) * 9/16
5/16 * 9/16
(45/16)/16
2/16

Right-hand side:
8/16 * (11/16 * 9/16)
8/16 * (99/16)/16
8/16 * 6/16
(48/16)/16
3/16

(a * b) * c ≠ a * (b * c)
:O

:D

#FixedPoint #Maths #Programming

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst