logarithm
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.[详细]
2023-04-04 08:26 分类:问答How to group the closest locations nearby given lat and long?
Imaging that I have an array of places, and each item include name, lat and long of that place. Now I want to group nearby items using a radius in miles for example.[详细]
2023-03-31 18:17 分类:问答Create a chart with Logarithmic Y axis
I have created various Charts using Arithemtic(constant scale) on Y-axis. Now I wish to create one with a Loga开发者_如何学JAVArithmic Y axis.[详细]
2023-03-30 01:34 分类:问答Displaying minor logarithmic ticks in x-axis in R
I have a normal distribution plot and a histogram plot with x axis in log scale displaying 0, 10^0, 10^1 ... I want to include minor ticks between the major ones. Actually I was able to change t开发者[详细]
2023-03-25 07:51 分类:问答C/C++ fastest cmath log operation
I\'m trying to calculate logab (and get a floating point back, not an integer). I was planning to do this as log(b)/log(a). Mathematically sp开发者_如何转开发eaking, I can use any of the cmath log fun[详细]
2023-03-19 06:24 分类:问答Why does Math.Log crash only inside my for loop?
I have the below code A = 1.0 B = 0.20 N = 8.0 for i in 1..Total t = Maxt * rand x = A * Math.cos(t) / (Math.log(B*Math.tan(t/(2*N))))[详细]
2023-03-17 02:24 分类:问答Java loop invariant
int logarithmCeiling(int x) { int power = 1; int count = 0; while (power < x) { power = 2 *power; count = count +1;[详细]
2023-03-08 05:43 分类:问答Adding a log in asymptotic analysis
Have a problem I\'m trying to work through and would very much appreciate some assistance! What\'s the time complexity of...[详细]
2023-03-02 14:19 分类:问答What does Logn actually mean?
I am just studying for my class in Algorithms and have been looking over QuickSort. I understand the algorithm and how it works, but not how to get the number of comparisons it does, or what logn actu[详细]
2023-03-02 02:32 分类:问答Compute Logarithm
I\'m trying to write a method that takes in a base k and a value n to 2 decimal places, then computes the log base k of n without using any of Java\'s Math.log methods. Here\'s what I have so far:[详细]
2023-02-25 09:55 分类:问答