2 Replies - 15193 Views - Last Post: 15 January 2008 - 12:36 PM Rate Topic: -----

#1 captainhampton  Icon User is offline

  • Jawsome++;
  • member icon

Reputation: 13
  • View blog
  • Posts: 548
  • Joined: 17-October 07

Plus or Minus Notation?

Post icon  Posted 15 January 2008 - 11:56 AM

I have a really quick question about if it is even possible to give a "plus or minus" notation within an equation, for example the quadratic formula discriminant:

(-b sqrt (b2 4 a c) / 2 a

I first thought perhaps:

-b + || - .....



However that threw up errors,

I also tried

-b +-.....



However it took the last "-" as a negative sign as opposed to plus or minus

any help would be appreciated

Is This A Good Question/Topic? 1

Replies To: Plus or Minus Notation?

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Plus or Minus Notation?

Posted 15 January 2008 - 12:17 PM

You have to remember that what you have there is actually two different formulas (although always presented as one). there is no native symbol in C or C++ to represent this. you could create a class to handle it if you wish.
Was This Post Helpful? 0
  • +
  • -

#3 captainhampton  Icon User is offline

  • Jawsome++;
  • member icon

Reputation: 13
  • View blog
  • Posts: 548
  • Joined: 17-October 07

Re: Plus or Minus Notation?

Posted 15 January 2008 - 12:36 PM

View PostAmadeus, on 15 Jan, 2008 - 12:17 PM, said:

You have to remember that what you have there is actually two different formulas (although always presented as one). there is no native symbol in C or C++ to represent this. you could create a class to handle it if you wish.


Gotcha, thank you very much
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1