not quite understanding the MATH function


Results 1 to 11 of 11

Threaded View

  1. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    It will help if you post the part of your program where you declare all of the variables you are using, and also post the errors you are getting.

    Its not a good idea to use 0.5*(etc etc). You will be better off shifting 1 place to the right like this (etc etc)>>1.

    Also, if you are declaring variables as bytes you have to make sure you cant possibly end up with a value higher than 255 in any of your calculations.
    Last edited by Kamikaze47; - 16th January 2006 at 17:16.

Similar Threads

  1. Resolution integer math assistance?
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th January 2010, 03:01
  2. Line Graph, math problem...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th May 2009, 04:20
  3. PBPL Math...new math takes more cycles...Always?
    By skimask in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2008, 10:22
  4. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 09:45
  5. Random function - How to limit it ??
    By martarse in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 30th November 2004, 14:05

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