## Fast fixed point pow, log, exp and sqrt

I’ve got a fixed point class (10.22) and I have a need of a pow, a sqrt, an exp and a log function.

Alas I have no idea where to even start on this. Can anyone provide me with some links to useful …

## Why are log2 and log1p so much faster than log and log10?

Whilst playing around with this question I noticed something I couldn’t explain regarding the relative performance of np.log2, np.log and np.log10:

In [1]: %%timeit x = np.random.rand(100000)
….:…

## How can I compare the performance of log() and fp division in C++?

I’m using a log-based class in C++ to store very small floating-point values (as the values otherwise go beyond the scope of double). As I’m performing a large number of multiplications, this has the …

## How to find a binary logarithm very fast? (O(1) at best)

Is there any very fast method to find a binary logarithm of an integer number? For example, given a number
x=52656145834278593348959013841835216159447547700274555627155488768 such algorithm must find …

## De Bruijn-like sequence for `2^n – 1`: how is it constructed?

I’m looking at the entry Find the log base 2 of an N-bit integer in O(lg(N)) operations with multiply and lookup from Bit Twiddling hacks.

I can easily see how the second algorithm in that entry …

## Logarithm Calculation with Windows 7 Calculator

I would like to use the Windows Calculator in Scientific Mode in order solve a very basic Logarithm equation but, unfortunately, I couldn’t do that.

Here is the problem:

log_5 125=?
Thank you very …

## Logarithmic y-axis bins in python

I’m trying to create a histogram of a data column and plot it logarithmically (y-axis) and I’m not sure why the following code does not work:

import numpy as np
import matplotlib.pyplot as plt
data =…

## What is the complexity of the log function?

What is the complexity of the log base 10 function?

## Log to the base 2 in python

How should I compute log to the base two in python. Eg. I have this equation where I am using log base 2

import math
e = -(t/T)* math.log((t/T)[, 2])

## What is the difference between ‘log’ and ‘symlog’?

In matplotlib, I can set the axis scaling using either pyplot.xscale() or Axes.set_xscale(). Both functions accept three different scales: ‘linear’ | ‘log’ | ‘symlog’.

What is the difference between ‘…