Results 1 to 5 of 5

Thread: Separate all values in an expression: (a-1)/b --> ((a/1)*(1/b))-(1/b)

  1. #1
    New Member
    Join Date
    Feb 2018
    Posts
    3

    Separate all values in an expression: (a-1)/b --> ((a/1)*(1/b))-(1/b)

    For code I am writing, I have a goal to change an expression such that all values can be represented as a simple fraction where 1 is either the numerator or denominator -- and each fraction cannot be separated by division. Sounds crazy, I know - this is more of an exercise than anything.

    Is this even possible? For example:

    (a-1)/b --> ((a/1)*(1/b))-(1/b)

    I have found I am able to do this with a lot of algebraic expressions. However, if a + or - exists in a denominator, I don't seem to be able to break it out. For example:

    a/(b-1)

    The best I can do is: (a/1)*(1/(b-1))

    Just fyi, right now I am not seeking to solve for log, exp, etc, just +-/* operators...

    Thanks!

  2. #2
    Elite Member
    Join Date
    Jun 2007
    Posts
    17,873
    Quote Originally Posted by Ethrex View Post
    For code I am writing, I have a goal to change an expression such that all values can be represented as a simple fraction where 1 is either the numerator or denominator -- and each fraction cannot be separated by division. Sounds crazy, I know - this is more of an exercise than anything.

    Is this even possible? For example:

    (a-1)/b --> ((a/1)*(1/b))-(1/b)

    I have found I am able to do this with a lot of algebraic expressions. However, if a + or - exists in a denominator, I don't seem to be able to break it out. For example:

    a/(b-1)

    The best I can do is: (a/1)*(1/(b-1))

    Just fyi, right now I am not seeking to solve for log, exp, etc, just +-/* operators...

    Thanks!
    How about:


    a/(b-1) = 1/[(b-1)/a] = 1/[{(b/1)*(1/a) - (1/a)}]
    “... mathematics is only the art of saying the same thing in different words” - B. Russell

  3. #3
    Elite Member stapel's Avatar
    Join Date
    Feb 2004
    Posts
    15,925

    Cool

    Quote Originally Posted by Ethrex View Post
    For code I am writing, I have a goal to change an expression such that all values can be represented as a simple fraction where 1 is either the numerator or denominator -- and each fraction cannot be separated by division. Sounds crazy, I know - this is more of an exercise than anything.
    If you restrict yourself to using only fractions which have "1" as the numerator, you'll be in the Egyptian context. They may have figured out pyramids, but fractions were a bit of a struggle for them!

  4. #4
    New Member
    Join Date
    Feb 2018
    Posts
    3
    Thanks Subhotosh Khan, I think you got the right idea. You have successfully isolated the denominators from having addition/subtraction. Unfortunately the whole expression becomes a reciprocal itself. Is there any way to avoid that? I am trying to not have multiple layers of division, and in fact leave any division at the lowest layer (no more than a 1 or a variable in the numerator or denominator). I suspect it is not possible.

    stapel, that was an interesting read for sure!

  5. #5
    New Member
    Join Date
    Feb 2018
    Posts
    3
    So I figured out this:

    a/(b-1)
    = a * (1/(b-1))
    = a * ((b-1)^-1) // negative exponent

    Is there any way to distribute the exponent to b and -1 to separate them?

Bookmarks

Posting Permissions

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