Better HN
topnewbestaskshowjobs
Log inSign up

seg_fault

42 karma · joined Jul 4, 2020 (6y ago) · 18 submissions

meet.hn/city/de-Hohenschwangau

Socials:

- github.com/clemensmanert

Interests:

Programming

---

Submissions

comment 7mo ago · link · parent

If you understand German, I also recommend the readme of his other project: https://github.com/bsommerfeld/wsbg-terminal

comment 11mo ago · link · parent

I had the same experience. C++ doesn't even compile or I have to tell it all the time "use C++23 features". I tried to learn OpenGL with it. This worked out a bit, since I had to spot the errors :D

comment 1y ago · link · parent

What kept me as an intern during education is the feedback and the nerdy chitchat. Developing as an intern in a team, where you have your own project and the possibility to chat with experienced people from various fields can be a huge impact. I had no deadlines, so if someone proposed a better way to do something I tried it and I learnt a lot from that.

Besides, talking to other people face to face about your project always gave me a huge motivation boost.

comment 2y ago · link · parent

Awesome! The fold up mechanism is a great idea to make it look clean, when there is no party and it also saves the hardware from dust :D

comment 2y ago · link · parent

My type is a bit simpler. But I think the approach is the same. After all, boost's type has much more math functions implemented. I don't have exp, sqrt...

comment 2y ago · link · parent

If I understand this correctly GMP has a flexible mantissa with no limitations during runtime.

In fas you have to specify the sizes (of mantissa and exponent) during compile time. So the size of this type is fixed. Thus, there is no heap involved.

comment 2y ago · link · parent

Removed it.

comment 2y ago · link · parent

Somebody wants to use it? :D I thought about something like where people can use it but have to make changed public. I am just curious, what should be changed. But I dont think there is actually a real world use case.

comment 2y ago · link · parent

I remember that I tried that some time ago. Especially the multiplication was tough, but I can not recall where I gave up. When I find some time, I will pick it up again :)

comment 2y ago · link · parent

Sure.

    Float<int64_t, int64_t>
Gives you a signed Mantissa with 64 bit and a signed Exponent with 64bit. Since there are numeric limits for int64_t available, Float knows the max and the min value.

You could get even bigger ranges for Float by implementing your own big integer type.

comment 2y ago · link · parent

I don't get what you mean. I thought they specify how the type can be used?

comment 2y ago · link · parent

Thank you :)

comment 2y ago · link · parent

Actually you can specify the numeric limits of the mantissa and the exponent. They can be specified as template arguments[0]. So you could do:

      Float<uint8_t, // type of the mantissa
            uint8_t, // type of the exponent
            0,       // lowest possible value of the mantissa
            4095,    // highest possible value of the mantissa
            0,       // lowest possible value of the exponent
            7>       // highest possible value of the exponent
The Float then simulates an unsigned 12bit mantissa and a 3bit exponent. Sure it still takes 16 bytes. But you could create a union with bitfields where you shrink that even further.

[0] https://github.com/clemensmanert/fas/blob/58f9effbe6c13ab334...

comment 2y ago · link · parent

Rounding: actually it just cuts off. I have not spent much time to think about how to specify and implement the different rounding modes. Maybe some day...

Thanks for the hint to the paper. I also faced these issues. Thus, I provided a constructor which accepts mantissa and exponent as values. Very handy for the unittests.

15.

Show HN: Floating point arithmetic types in C++ for any size and any base(github.com ↗)

79 points · by seg_fault · 2y ago · 41 comments

comment 2y ago · link · parent

I do. And a lot of my neighbors. In Germany it is pretty common to to have a few chicken in the backyard in countryside areas. My parents life in the Munich suburban belt and even have a rooster in their flock. Their neighbors have not complained so far.

They eat snails and all the kitchen scaprs and I seldom have to buy eggs. Besides, it is so lovely to watch them in the garden. Their social live and their communication within the flock is very interesting to watch.

There are also a lot of nice hacker projects out: self closing chicken coop, monitoring, live cams.

And they really look nice, there are so many beautiful breeds, just type chicken breed in duckduckgo image search.

17.

Show HN: Switch colors in dotfiles between light and dark quickly(github.com ↗)

1 points · by seg_fault · 2y ago · discuss

comment 6y ago · link · parent

I'm a software developer with 3 years experience. I'm looking for a remote job in the C/C++ field. I'm interested in low-level/embedded.

  Location: Germany
  Remote: Yes preferred
  Willing to relocate: No
  Technologies: C/C++, Ada, Linux
  Résumé/CV: http://manert.de/cv.pdf
  Email: seg_fault@manert.de
  Github: https://github.com/clemensmanert