Searching \ for '[OT] Multiply by 1???' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=multiply
Search entire site for: 'Multiply by 1???'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Multiply by 1???'
2006\02\20@113941 by John Pearson

flavicon
face
I have an equation that multiplies by 1:

1 * A^ .3241

Is there any reason I have to multiply be 1?  Just trying to save a little program space and execution time.

Thanks

John

2006\02\20@120739 by Mike Hord

picon face
Hmmm.  Is it something in the syntax of the language you're
using, relatted to an exponential?

Perhaps a means of setting a flag?  A multiply by one would
cause the zero flag to trip if A = 0...

???

Mike H.

On 2/20/06, John Pearson <spam_OUTxeroTakeThisOuTspamcmc.net> wrote:
> I have an equation that multiplies by 1:
>
> 1 * A^ .3241
>
> Is there any reason I have to multiply be 1?  Just trying to save a little program space and execution time.
>
> Thanks
>
> John
> -

2006\02\20@123632 by Spehro Pefhany

picon face
At 08:40 AM 2/20/2006 -0800, you wrote:
>I have an equation that multiplies by 1:
>
>1 * A^ .3241
>
>Is there any reason I have to multiply be 1?  Just trying to save a little
>program space and execution time.
>
>Thanks
>
>John

More context might help. Where are you getting the equation from? How are
you implementing it?  In any case, multiplying a floating point number by
1 will probably not do anything, and even if the optimizer isn't smart
enough to get rid of it entirely, it won't likely use much time or room,
especially compared to that nasty x^y function (assuming A is a variable
so it cannot be pre-computed).

>Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2006\02\20@161851 by Andres Paglayan

flavicon
face
only if it's a large or small value for one.
; )

Spehro Pefhany wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...