Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

rational-numbers

Design principles behind std::ratio

December 2, 2023 by Tarik

When N2661 was proposed, none of the proposal authors had access to a compiler which implemented constexpr. And none of us were willing to propose something we could not build and test. So whether or not a better design could have been done with constexpr was not even part of the consideration for the design. … Read more

Categories c++ Tags c++, c++11, metaprogramming, rational-numbers Leave a comment

The “guess the number” game for arbitrary rational numbers?

February 10, 2023 by Tarik

Okay, here’s my answer using continued fractions alone. First let’s get some terminology here. Let X = p/q be the unknown fraction. Let Q(X,p/q) = sign(X – p/q) be the query function: if it is 0, we’ve guessed the number, and if it’s +/- 1 that tells us the sign of our error. The conventional … Read more

Categories algorithm Tags algorithm, math, puzzle, rational-numbers Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa