Get the latest tech news

Closest Harmonic Number to an Integer


Given a number x, efficiently calculate n such that the nth harmonic number is the closest harmonic number to x.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Integer

Integer

Related news:

News photo

Integer continued fractions for complex numbers

News photo

Valkey 9.0-rc1 Taps AVX-512 For String-To-Integer Conversion For ~19% Gain

News photo

Dear String-to-Integer Parsers