Ask your own question, for FREE!
Mathematics 30 Online
Parth (parthkohli):

Sage.

OpenStudy (anonymous):

thyme

Parth (parthkohli):

I want to define a function which presents everything in interval notation.

Parth (parthkohli):

here is an input, for example: ``` In[1]: 34 In[2]: 53 ``` The output is very easy in this case: ``` [34,53] ```

Parth (parthkohli):

But what if I have something like this? ``` In[1]: x > 4 ln[2]: x < infinity ``` Where I want ``` [4,infty) ```

Parth (parthkohli):

Yup. @experimentX I know that you are rad at programming. Can you help?

OpenStudy (experimentx):

what do you want to do?

OpenStudy (anonymous):

rad? welcome to 1990s

Parth (parthkohli):

@TuringTest You, please?

Parth (parthkohli):

OK, on second thought, I want something like this: ``` Number 1: 4 Number 2: infinity Inequality type: closed. ``` And the output is... ``` [4,infty) ```

Parth (parthkohli):

Just an interval notation.

OpenStudy (experimentx):

I don't think you could do that, because the set of real number is both closed and open set.

OpenStudy (experimentx):

[4, infinity) could be both (neither closed nor open) and (closed set)

Parth (parthkohli):

hmm...

OpenStudy (experimentx):

try something like this around in mathematica `f[a_, b_] := If[NumericQ[a] && NumericQ[b], Print["Closed"], Print["Open"] ] ` ` f[1,2] ` BTW how did you put those colorful text?

Parth (parthkohli):

I don't have Mathematica; my computer got formatted :-(

OpenStudy (experimentx):

on what language are you planning to write it?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!