A short post today because I am pushing all the work over to you! <g/> How many answers to “38.30 – 1 1/2 = ???” can you think of? Here are a few to get you started:

- 36.80 (assuming both are decimal numbers)
- 36.30 (assuming minutes.seconds)
- An error message that “38.30” is an invalid number in the current locale (assuming the current locale treats the period as a thousands separators rather than a decimal point)

Post your answers in the comments!

So, this one is a little far out but say we collapses all spaces in a math equation.. the answer then would be 32.8 (39.30-5.5)

or, say order of operations is addition/substraction before mult/div and the spaces are dropped… we get 13.65 via (38.30-11)/2

*A parser error, some locales don’t use the period mark at all(for instance, scandinavian languages)

*36 – assuming int as datatype, C# as language

*37 – assuming int as datatype, vb.net as language(vb.net uses bankers rounding, totally messed up)

Hmmm… maybe not enough coffee yet. Can’t think of any more…

33.30 (assuming whitespace is ignored and ‘1 1/2’ evaluates to an integer)

32.80 (assuming whitespace is ignored and ‘1 1/2’ evaluates to a decimal)

37.30 (assuming ‘1/2’ evaluates to an integer)

38.30-1 1/2

Hi Michael,

I was think on post at night but.. I presume that Michael Bolton or James Bach where about to post here with: "What is the context?" and thats right, there are multiple answers and one valid for the context .. 😉

one of the multiples ones is to assume that the dot is in the context a multiplication operator so:

38.30 – 1 1/2 = 1140 – 1 1/2 = 1138 1/2 (aka. 38×30 – 1.5 = 1140 – 1.5 = 1138.5)

Another thing is to presume that the calculator or the input innores the space character so it translate as: 38.30 – 11/2 and then the answer is 32.8

and so on…

Wouldn’t 38:30 be 38 minutes 30 seconds, which is 38.5 minutes? If you subsection 1 1/2 minutes, the result would be 37 minutes, right?

larmccoy: You’re right, my math was completely wrong on that one!

* parser error: 1 1/2 is not valid in many programming languages

* degree-minute-second format

38.3 – 1 1/2 = 37 degrees

Apart from all of the above – my take:

38.30 – 1 1/2 = 38.30 – 1 1/2

Completely depends what and where I am working on! I work on a software called SAS, where they have a feature called macro variables. If you assign a macro variable to 38.30 – 1 1/2, it treats everything as text and the final result is going to be exactly what you pass to it.

No one has said what base we’re working in. Sure you can assume base10 and the equation itself implies at least 8 digits – but infinite possibilities still remain.

Try to input 38.30 – 1 1/2 into IE address bar.

MS Word Zoom percentage gives “This is not a valid measurement”

Excel gave 36.8 while it converted 11/2 as 1.5

Google gave it 36.8 while it interpreted 38.30 – (1 1/2) = 36.8

MSN gave 32.8 considering 11/2 as 5.5

Yahoo search engine treats it as a string input and gives the results like “Filson Bridle Belt 1 1/2" 30-38"”

Basic Calculator at http://www.math.com does not recognize it as a valid arithmetic expression

Space between 1 and 1/2 makes a difference in Excel again. One space would give 36.8 while more than one space would give a formula error proposes a correction as 11/2

38.30-1 ½ – this fraction character when copied to excel gives formula error

Michael, this is a trick question…right?

I wouldn’t even begin to waste my time trying to come up with answers to this problem, because they would simply be wild-ass guesses.

But, I could come up with a lot of questions! 🙂

If I asked this question in an interview, and the person being interviewed just started throwing out wild-ass guesses without asking some very smart precision questions to better define the problem space I frankly wouldn’t be very impressed. But, that is my opinion.

my take in different contexts:

* 37.00(assuming hours.minutes)

* 36.8(assuming only the last one digit after decimal is considered)

* 36.8(assuming white space after decimal is considered as zero)

* 736/20 or 184/5 (answer in terms of fraction)

* 36 4/5 or 18 4/10 or 9 4/20 or 3 4/60 or 1 4/180(answer interms of mixed fraction)

Hi

Likewise I can think of few more answers

3680*(10^-2) or 368.0*(10^-1) or 3.680*(10) or 0.3680*(10^2) and so on..depending on the context.

Testy et al: Yes this is a trick question. And it isn’t. In a "’test this" situation, I would indeed expect a bunch of questions about context, as you and Alejandro suggest. In a brainstorming situation, however, I generally leave the discussion wide open, as too many constraints can eliminate ideas before they ever thought. (And yes, even then there is *some* context.)

Thanks for calling me out! I will be more precise next time.

My Answers:

* 18.65 ( assuming 38.30 -1 = 37.30 and then 37.30 * .5 = 18.65)

* 37.00(assuming hours and minutes)

* 36.80 (assuming both are decimal numbers)

* 33.30 ( assuming 1 1/2 is treated as 11/2 which is truncated to 5)

* 37 29.5 (assuming Kms and mts…First would turn out to be 38 Km 30 mts and second one will be 1 Km and .50 mts)

* 32.80 (assuming space is ignored and ‘1 1/2’ evaluates to a decimal)

36.8 – If both are decimal

Feb 5, 1990 7:12pm – if both are days

(38.30 – 31 = 7.30; i.e. 7Feb .30 day

7.30 – 1.5 = 5.8; i.e. 5 Feb .8 day

i.e. 5 feb .8*24 = 5 feb 19.2 hrs

i.e. 5 feb 19hrs .2*60 mins

i.e. 5 feb 19 hrs 12 mins)

36 4/5 – if its a fraction calculation

3.68E+01 – if its a scientific calculation

If the calculator is Reverse Polish Notation (http://en.wikipedia.org/wiki/Reverse_Polish_notation)

Then the entries are

38

– (at this point the result is -38)

1 1

/

2

When you get to ‘1 1’ an error is given that its not a number.

If that error is ignored by the calculator or a script in the case of automating the operations ; the calculation will become

38

–

/

2

Which assuming all stack values are zero to start with becomes

0

38

–

/ (at this point the result is 0 => (0 / (0 -38))

2

Which gives the answer of 2 because the 2 entered at the end.