Re: How to force numeric output

• To: mathgroup at smc.vnet.net
• Subject: [mg115635] Re: How to force numeric output
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Mon, 17 Jan 2011 05:37:32 -0500 (EST)

"It still apparently will not work because Mathematica does not know
whether a positive or negative answer is desired."

WHAT will not work?

y = 5; x = Floor[Sqrt[y + 1.0]]; x

2

The result is numeric, it's positive, it's correct, and it has nothing to
do with the Meter > 0 && Second > 0 situation from the other post.

Bobby

On Sun, 16 Jan 2011 04:55:08 -0600, KenR <ramsey2879 at msn.com> wrote:

> On Jan 15, 4:45 am, KenR <ramsey2... at msn.com> wrote:
>> I am new to Mathematica and cant seem to get it to give a numeric
>>
>>  input    y = 5; x = floor[sqrt[y+1.0]]; x.
>>
>> instead of a numeric it gives "out floor[sqrt[6.0]]"
>>
>> what am I doing wrong?
>>
>> I have Mathematica 8.0
>>
>> Thankyou, Kenneth Ramsey
>
> I was looking at past posts and came upon a similar situation.  Thanks
> to those who e-mail me I am aware that the functions Floor and Sqrt
> must be capitalized.  It still apparently will not work because
> Mathematica does not know whether a positive or negative answer is
> desired.
>
> A similar situation was posted below where the sqrt of meter^2 etc was
> desired. A reader responded to write the code "Assuming[
> {Positive[Meter], Positive[Second]},
>   Refine[(Sqrt[Meter^2/Second^2] Second)/Meter^2]
>
> How would I invoke a similar solution to my case?
>

--
DrMajorBob at yahoo.com

• Prev by Date: Re: Apply or Map on some parts of lists - help
• Next by Date: Re: avoiding non-machine numbers
• Previous by thread: Re: How to force numeric output
• Next by thread: Re: How to force numeric output