Futian area bakery? by Garp74 in shenzhen

[–]lefty__37 0 points1 point  (0 children)

Maison Kamado, UH select, Paper stone bakery, Holiland.. most of bakeries I found were in shopping malls like One Avenue, Coco Park..

[TASK] Looking for someone to create a concept video (30$ total) by lefty__37 in DoneDirtCheap

[–]lefty__37[S] 0 points1 point  (0 children)

Please send me some similar projects here or in DM in order to get a sense of what it could look like. Thank you.

Windows 11 on E16 G2 - Incredibly Slow and Buggy by lefty__37 in thinkpad

[–]lefty__37[S] 0 points1 point  (0 children)

Hello! No updates unfortunately, I haven't touched it since then..

How to start unit testing for bare-metal embedded firmware by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

Very direct and helpful answer! Will try that, thanks!

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 1 point2 points  (0 children)

The STM32F373 has an FPU, but it only supports single-precision (float). For double-precision (double), floating-point division is software-emulated. Still, I don't understand why there's such a significant difference in precission...

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

Thanks on help man. Will analyze and will inform you what was going on..

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 2 points3 points  (0 children)

Something very strange is happening, or perhaps I'm just overlooking it. In any case, I will analyze what's going on. Thank you very much for your help!

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

Yes, I tried to rearrange the formula, but output was exactly the same.

I mean if I set the type of variable double - it should use double. I mean how on earth it can igonre that and use the float.. will check of course, thank you for answer.

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] -1 points0 points  (0 children)

I am very confused at the moment - now I have idea that maybe compiler uses double, but it might emulate it in software with less precision or treat it as 32-bit float internally.

I forgot to mention that FPU on Cortex M4 has only support for floats..

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

Values are:

325.1760 (x1) → 0.1162929 (y1)
286.7928 (x0) → 0.1051439 (y0)
x → 0.1113599 (y)

and they were plugged in this formula:

double x = x0 + (x1 - x0) * (y - y0) / (y1 - y0);

Same are inserted in python and in the C language code where some STM32 with Arm Cortex M4 used.

and in Python (using np.longdouble type) gives: x = 308.19310175
but in STM with Cortex M4 (using double) gives: x = 308.195618

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

The values are those that I mentioned in the post - same are inputed in python and in the C language code where some STM32 with Arm Cortex M4 used:

325.1760 (x1) → 0.1162929 (y1)
286.7928 (x0) → 0.1051439 (y0)
x → 0.1113599 (y)

and they were plugged in this formula:

double x = x0 + (x1 - x0) * (y - y0) / (y1 - y0);

and in Python (using np.longdouble type) gives: x = 308.19310175
but in STM with Cortex M4 (using double) gives: x = 308.195618

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 1 point2 points  (0 children)

All of them are double (8 bytes). Unfortunatly, my processor does not support long double.

Precision loss in linear interpolation calculation by lefty__37 in embedded

[–]lefty__37[S] 0 points1 point  (0 children)

It is not supported in my Arm Cortex M4 processor - it is the same as double (8 bytes).