Thread: log10(long long) ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    266

    log10(long long) ?

    I have a long long type that i am trying to find the log10 of but I can't seem to get around an error..any solutions?

    thanks

    (n2 is long long)
    Code:
    unsigned long long L2 = log10(n2) /  log10(2);
    Code:
    Error	1	error C2668: 'log10' : ambiguous call to overloaded function	c:\documents and settings\all users\desktop\3216968-src.cpp	14


    log10 - C++ Reference

    takes double and long double..should I be trying to do a conversion?

    (and if it matters, the value i am holding in n2 is slightly under 1million)

    thanks
    Last edited by rodrigorules; 01-27-2010 at 02:38 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 09-30-2008, 02:12 AM
  2. Having Buffer Problems With Overlapped I/O --
    By Sargera in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 04:46 PM
  3. Problem in Converting Unsigned long to String
    By cprogrammer_18 in forum C Programming
    Replies: 8
    Last Post: 01-14-2006, 08:57 AM
  4. Merge and Heap..which is really faster
    By silicon in forum C++ Programming
    Replies: 2
    Last Post: 05-10-2005, 04:06 PM
  5. Insertion Sort Problem
    By silicon in forum C++ Programming
    Replies: 1
    Last Post: 05-08-2005, 12:30 PM