Group Abstract Group Abstract

Message Boards Message Boards

0
|
106 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Different outputs when using numerics vs variables

Posted 1 day ago

Hello. This is my first post. I'm sorry if I'm either posting it incorrectly, or posting about something I shouldn't be.
If this is somewhere here already, then I don't know enough to know what to search for to find my answer.

Ok... Please don't sigh, and hear me out...
6÷2(1+2) I know, Eww. Right?
My question is why does Wolfram process the following differently than if it's in numerical form?

a÷bc, a=6, b=2, c=(1+2) or transpose c=3 if that's the correct format.
I don't want to know if you think it's 1 or 9. I don't want to know if you think it's ambiguous.
I'm asking why with numbers it gives me one answer, but with variables it gives a different answer.
Is there a Convention I'm not thinking of that explains it? Is it some Computer Programing thing?
What did I do wrong?

Thank you for your time.

POSTED BY: Clifford Kelley
2 Replies
Posted 18 hours ago

It would be helpful to know what result you actually got. Also, it would help us if you use the formatting tools to show exactly what you input.

I'm assuming that you didn't have a space between the b and c.

a = 6;
b = 2;
c = (1 + 2);

a/b c
(* 9 *)

a/bc (* notice no space *)
(* 6/bc *)
POSTED BY: Eric Rimbey

Thank you for your response. I apologize, I thought I had attached a picture to my first post with the results. You were correct in your assumption that no space was added between b and c. The only spaces I've used are after the commas between the variable definitions. I did both of these in Natural Language mode. To get the Obelus "÷" I used Alt+0247. I used an Obelus instead of the "/" as that's what the original numerical problem used. * I do understand that ÷ isn't really used anymore, but I was attempting to stay as accurate to the original as possible *

Thank you for taking the time to help me understand what I hope is just an error in my Input that I'm not grasping.

My results

POSTED BY: Clifford Kelley
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard