Approximation by prime powers
The well-known Weierstrass approximation theorem says that polynomials are dense in C [0, 1]. That is, given any continuous function f on the unit interval, and any ε > 0, you can find a polynomial P such that f and P are never more than ε apart. This means that linear
Read moreLogarithm approximation curiosity
I’ve written before about three simple approximations for logarithms, for base 10 log10(x) ≈ (x – 1)/(x + 1) base e, loge(x) ≈ 2(x – 1)/(x + 1) and base 2 log2(x) ≈ 3(x – 1)/(x + 1). These can be used to mentally approximate logarithms to moderate accuracy, accurate
Read moreIterated Mersenne primes
A Mersenne number is a number of the form 2k − 1. A Mersenne prime is a Mersenne number which is also a prime. It turns out that if 2k − 1 is prime then k must be prime, so Mersenne numbers have the form 2p − 1 is prime.
Read moreSmall probabilities add, big ones don’t
A video has been making the rounds in which a well-known professor [1] says that if something has a 20% probability of happening in one attempt, then it has a 40% chance of happening in two attempts, a 60% chance in happening in three attempts, etc. This is wrong, but
Read moreBetween hyper-focus and burnout: Developing with ADHD
Eira and Ryan talk with Chris Ferdinandi, a front-end developer and ADHD advocate, about his diagnosis experience, the importance of accommodations for neurodivergent folks, and some advice for devs looking for the best tools and tactics for managing ADHD at work.
Read moreLogistic regression quick takes
This post is a series of quick thoughts related to logistic regression. It starts with this article on moving between logit and probability scales. *** Logistic regression models the probability of a yes/no event occurring. It gives you more information than a model that simply tries to classify yeses and
Read moreHow a sound engineer builds coding skills on CodeSignal Learn
Whether you’re trying to break into tech, prepare for the job search, or level up in your current role, it helps to know that you’re not alone in your journey to build your technical skills. That’s why we’re sharing stories from learners like you: to motivate and inspire others in
Read moreNumerical application of mean value theorem
Suppose you’d like to evaluate the function for small values of z, say z = 10−8. This example comes from [1]. The Python code from numpy import exp def f(z): return (exp(z) - 1 - z)/z**2 print(f(1e-8)) prints -0.607747099184471. Now suppose you suspect numerical difficulties and compute your result to
Read more