Math Help Please


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Break the equation in two

    I think your problem is a result of the triple multiplication. None of the PBP examples I have seen allow this.

    PBP does allow
    x = a*b
    y = div32 c

    Your constant, 5252, has 6 factors, namely 1, 2, 4, 13, 26, and 52.

    Break the equation in two with divisors say 52 and 101 and see how you go. Beware the integer division truncation problem where 201/101 = 1.

    The new LONG variable type (PBP 2.50 and up) MIGHT solve your problem but only after some gymnastics as the LONG type appears to allow big multiplicands but retains integer division so you probably need to scale all your numbers UP by factors of 100 or so.

    HTH
    BrianT

  2. #2
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Thanks Brian.

    Mark

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. Pulsin Math question
    By ruijc in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 2nd April 2008, 16:15
  4. 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
  5. not quite understanding the MATH function
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th January 2006, 20:20

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