Thread: Seeking some guidance from the wise.

  1. #1
    Registered User
    Join Date
    Jan 2005

    Question Seeking some guidance from the wise.

    I’ve written a basic maths program and am thinking about adding some algebra functions to it like if user enters

    (A +2B)(4A + 6C)

    It would output

    4A^2 + 6AC + 8AB + 12BC

    I can’t quite decide how to write it. Would you work with it like a string or turn each term into some sort of token and work with them. Does anyone know what category this falls into mathematically or in computer science. The rules, which help to do things by hand, aren’t always much use when you attempt to implement it in a program.

    Been hunting for things like this but I’m not sure of its proper title so its hard to find.
    Currently Reading:

    Mathematic from the birth of numbers,
    Effective TCP/IP programming,
    Data Compression: The Complete Reference,
    C Interfaces and Implementations: Techniques for Creating Reusable Software,
    An Introduction to Genetic Algorithms for Scientists and Engineers.

  2. #2
    Registered User
    Join Date
    Mar 2004
    ill just give you some idea, it will most likely be wrong or really messy but its just an idea to get you thinking i guess.

    what you could is think of (A +2B)(4A + 6C) as 2 matrices and you can multiply the values in the matrices. im pretty sure doing this is hard but just an idea.

    or just think of it as 2 arrays where you multiply their values and you get another 3rd array as the result.
    When no one helps you out. Call google();

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Aeres seeking interested hoobyists!
    By Akkernight in forum Projects and Job Recruitment
    Replies: 13
    Last Post: 03-19-2009, 11:50 AM
  2. Guidance, please.
    By mattagrimonti in forum C Programming
    Replies: 2
    Last Post: 11-26-2008, 08:50 AM
  3. need guidance to connect to serial port
    By gnychis in forum Linux Programming
    Replies: 1
    Last Post: 06-02-2005, 10:10 AM
  4. Audio guidance.
    By Sebastiani in forum Windows Programming
    Replies: 6
    Last Post: 12-22-2002, 09:14 AM
  5. Wise words, mate
    By buck71 in forum C Programming
    Replies: 1
    Last Post: 09-14-2001, 10:21 AM