Trying to use Logs in code


Closed Thread
Results 1 to 2 of 2
  1. #1

    Default Trying to use Logs in code

    Is there a way to use logarithims in picbasic. How would you go around doing so? im trying to do something like this in my code:

    w = log*(s/(s-u)) where w is a declared var and so is s and u and trying to take the log and store that value into the varialble W

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by civicgundam View Post
    Is there a way to use logarithims in picbasic. How would you go around doing so? im trying to do something like this in my code:

    w = log*(s/(s-u))
    You REALLY sure of your formula ???

    not me !!!



    you can write "log" as a Tailor's series ... ( Log 1+x ) = x - x^2/2 + x^3/3 - ...

    No,no ... Darrel didn't write this one ... ( LOL )

    but the easiest way is to use a co-processor ( http://www.micromegacorp.com/pbp.html )

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts