473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

TAking the minimum of three values

I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

Sona

Jul 19 '05 #1
28 9098

"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

Sona


x = min( a, min( b, c ) );

-Howard


Jul 19 '05 #2
Sona wrote:
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks


In C++

#include <algoritm>

double min3(double a, double b, double c) {
return std::min(a, std::min(b, c));
}
Jul 19 '05 #3
> #include <algoritm>

double min3(double a, double b, double c) {
return std::min(a, std::min(b, c));
}


To keep the templated aspect of min, you could even write

namespace
{
template<class T>
T& min(T const& a, T const& b, T const& c)
{
return min(a, min(b,c));
}
}

Like that std::min works with any type, and with 2 or 3 arguments
Jul 19 '05 #4
Sona wrote:
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

Sona


Sona,

Thank you for your post.

--Steve

#include <stdio.h>

float min(float h, float j);

int main()
{
float a, b, c;

printf("Enter three float values, separated by spaces: ");
scanf("%f%f%f", &a, &b, &c);
/*
* NOTE: I had to round the floats off to two decimal places
* in the following printf statement, because I was getting
* weird errors otherwise.
*/
printf("The minimum of these three is %.2f\n", min(a, min(b, c)));

return 0;
}

float min(float h, float j)
{
if (h < j)
return h;
else
return j;
}

Jul 19 '05 #5
"Howard" <al*****@hotmail.com> wrote in message news:<bj********@dispatch.concentric.net>...
"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

Sona


x = min( a, min( b, c ) );


Given a typical definition of min(), that will not produce an efficient result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )

--
Peter
Jul 19 '05 #6
Peter Nilsson wrote:
"Howard" <al*****@hotmail.com> wrote in message news:<bj********@dispatch.concentric.net>...

x = min( a, min( b, c ) );

Given a typical definition of min(), that will not produce an efficient result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


Have you counted the number of evaluations of a or b this involves? There
is a good reason for preferring functions over defines.
--
Martin Ambuhl

Jul 19 '05 #7
Martin Ambuhl <ma*****@earthlink.net> wrote:
Peter Nilsson wrote:

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


Have you counted the number of evaluations of a or b this involves? There
is a good reason for preferring functions over defines.


Not to mention possible side effects; consider:

float m3, x, y, z;
m3 = min3( x *= 3.142, y /= 2.718, z += 1.111 );
Irrwahn
--
Computer: a million morons working at the speed of light.
Jul 19 '05 #8

"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

Sona


You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) < (z))
? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency. Of course it is totally unreadable. But
you asked for it :-)

Carsten Hansen

Jul 19 '05 #9
Carsten Hansen wrote:
"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks


You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) < (z))
? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency.


It is not even correct.

float min3(float x, float y, float z)
{
if (x < y)
if (x < z) return x;
if (y < z) return y;
return z;
}

Jirka

Jul 19 '05 #10

"Jirka Klaue" <jk****@ee.tu-berlin.de> wrote in message
news:bj**********@mamenchi.zrz.TU-Berlin.DE...
Carsten Hansen wrote:
"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks


You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) < (z)) ? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency.


It is not even correct.

float min3(float x, float y, float z)
{
if (x < y)
if (x < z) return x;
if (y < z) return y;
return z;
}

Jirka


Give an example where it fails.

Carsten Hansen
Jul 19 '05 #11

"Ron Natalie" <ro*@sensor.com> wrote in message
news:3f***********************@news.newshosting.co m...
Sona wrote:
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks


In C++

#include <algoritm>

double min3(double a, double b, double c) {
return std::min(a, std::min(b, c));
}

Please do not post off-topic things here. It waste the bandwidth and time.

--
Jeff

Jul 19 '05 #12
"Jeff" <no*****@notexist.com> wrote:

"Ron Natalie" <ro*@sensor.com> wrote in message
news:3f***********************@news.newshosting.c om...
In C++

#include <algoritm>

double min3(double a, double b, double c) {
return std::min(a, std::min(b, c));
}

Please do not post off-topic things here. It waste the bandwidth and time.


Erm, (almost) the whole thread is cross-posted between c.l.c and c.l.c++
--
Computer: a million morons working at the speed of light.
Jul 19 '05 #13
Carsten Hansen wrote:
"Jirka Klaue" wrote:
Carsten Hansen wrote:
"Sona" wrote:

I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) <
(z))
? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency.


It is not even correct.


Give an example where it fails.


#include <stdio.h>

#define MIN3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) < (z)) ? (x) : (((y) < (z)) ? (z) : (y)))

int main(void)
{
float a = 1.6, b = 1.7, c = 1.8;
printf("%f\n", MIN3(a, b, c));

a = 1.9, b = 1.7, c = 1.8;
printf("%f\n", MIN3(a, b, c));

a = 1.6, b = 1.7, c = 1.5;
printf("%f\n", MIN3(a, b, c));

return 0;
}

1.700000
1.800000
1.600000

Now, give an example where it works.
And even when you fix it, it probably is not the most efficient method.

Jirka

Jul 19 '05 #14
Carsten Hansen wrote:
"Jirka Klaue" <jk****@ee.tu-berlin.de> wrote in message
news:bj**********@mamenchi.zrz.TU-Berlin.DE...
Carsten Hansen wrote:
"Sona" <so**********@nospam.com> wrote in message
news:3f********@clarion.carno.net.au...
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks

You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) <
(z))
? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency.

It is not even correct.

float min3(float x, float y, float z)
{
if (x < y)
if (x < z) return x;
if (y < z) return y;
return z;
}

Jirka


Give an example where it fails.

Carsten Hansen


Carsten,
Thank you for your post.

I don't intend this post as mean-spirited; I cannot write such
a macro.
#include <stdio.h>

#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : \
(((x) < (z)) ? (x) : (((y) < (z)) ? (z) : (y)))

int main()
{
float x, y, z;

printf("Enter three float values, separated by spaces: ");
scanf("%f%f%f", &x, &y, &z);

printf("The least of these is %f\n", min3(x, y, z));

return 0;
}

Input from keyboard: 12345 44444 55555
Output to screen: The least of these is 44444

Jul 19 '05 #15
On Wed, 10 Sep 2003 04:34:29 +1000, Sona <so**********@nospam.com> wrote:
I need to find a minimum of three float values.. what would be the most
efficient way of doing this? Can someone please share a #define macro or
something with me for doing this? Thanks


First off, DO NOT, I repeat for your convenience, DO NOT, crosspost
general questions to both [comp.lang.c] and [comp.lang.c++].

Those are different languages.

Now _the_ (one and only) answer to your question is simple: the _most
efficient_ way of finding the minimum of three 'double' values is to
leverage contextual information and language- and implementation- quirks.
That depends very much on the problem to be solved, your current code,
the language you're using, and even the compiler. Post this information,
except the compiler, and you may receive more specific answers.

Jul 19 '05 #16

"Jirka Klaue" <jk****@ee.tu-berlin.de> wrote in message
news:bj**********@mamenchi.zrz.TU-Berlin.DE...
Carsten Hansen wrote:
"Jirka Klaue" wrote:
Carsten Hansen wrote:
"Sona" wrote:

>I need to find a minimum of three float values.. what would be the most>efficient way of doing this? Can someone please share a #define macro or>something with me for doing this? Thanks

You want a macro. Here you go:
#define min3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) <
(z))
? (x) : (((y) < (z)) ? (z) : (y)))

You can't beat that for efficiency.

It is not even correct.


Give an example where it fails.


#include <stdio.h>

#define MIN3(x, y, z) \
((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) <

(z)) ? (x) : (((y) < (z)) ? (z) : (y)))
int main(void)
{
float a = 1.6, b = 1.7, c = 1.8;
printf("%f\n", MIN3(a, b, c));

a = 1.9, b = 1.7, c = 1.8;
printf("%f\n", MIN3(a, b, c));

a = 1.6, b = 1.7, c = 1.5;
printf("%f\n", MIN3(a, b, c));

return 0;
}

1.700000
1.800000
1.600000

Now, give an example where it works.
And even when you fix it, it probably is not the most efficient method.

Jirka


Sorry. It is me being stupid. The macro I posted returns the median of the
three, not the minimum.
This one is much simpler.

#define min3(x, y, z) \
(((x) < (y)) ? (((z) < (x)) ? (z) : (x)) : (((z) < (y)) ? (z) : (y)))

Carsten Hansen

Jul 19 '05 #17
Carsten Hansen wrote:
....
>#define min3(x, y, z) \
>((x) < (y)) ? (((y) < (z)) ? (y) : (((x) < (z)) ? (z) : (x))) : (((x) < (z)) ? (x) : (((y) < (z)) ? (z) : (y)))
.... Sorry. It is me being stupid. The macro I posted returns the median of the
three, not the minimum.
This one is much simpler.

#define min3(x, y, z) \
(((x) < (y)) ? (((z) < (x)) ? (z) : (x)) : (((z) < (y)) ? (z) : (y)))


I see. Seems to be pretty efficient now, too. :-)

Jirka

Jul 19 '05 #18
Martin Ambuhl <ma*****@earthlink.net> wrote in message news:<Sj****************@newsread2.news.atl.earthl ink.net>...
Peter Nilsson wrote:
"Howard" <al*****@hotmail.com> wrote in message
news:<bj********@dispatch.concentric.net>...
x = min( a, min( b, c ) );

Given a typical definition of min(), that will not produce an efficient
result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


Have you counted the number of evaluations of a or b this involves? There
is a good reason for preferring functions over defines.


Inline functions yes; but functions, in C, not always.

My problem was not realising that the OP cross posted. My Bad.

I was reading it in clc and concentrated on "Can someone please share
a #define macro or something..." in the OP's post.

[I really don't know why people using C++ also ask C groups for
solutions when the answers are highly likely to involve different
paradigms and/or language constructs.]

Anyway, my mistake...

FWIW, C99 has its own version of inline functions too.

--
Peter
Jul 19 '05 #19

"Peter Nilsson" <ai***@acay.com.au> wrote in message news:63**************************@posting.google.c om...
x = min( a, min( b, c ) );


Given a typical definition of min(), that will not produce an efficient result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


The typical min is inlined to something like
a < b ? a : b

There's always two comparisons. Tests show no speed difference
between the two on my machine.

Jul 19 '05 #20

On Wed, 10 Sep 2003, Ron Natalie wrote:

"Peter Nilsson" <ai***@acay.com.au> wrote...
x = min( a, min( b, c ) );


Given a typical definition of min(), that will not produce an
efficient result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


The typical min is inlined to something like
a < b ? a : b

There's always two comparisons. Tests show no speed difference
between the two on my machine.


Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.

So we have, without the usual parentheses since they'd just
clutter the example:

#define min(a,b) ((a < b)? a: b)

#define min3_inefficient(a,b,c) min(a, min(b, c))

#define min3_better(a,b,c) (a < b)? min(a, c): min(b, c)
min3_inefficient(X, Y, Z) becomes

min(X, ((Y < Z)? Y: Z))

((X < ((Y < Z)? Y: Z))? X: ((Y < Z)? Y: Z)))
min3_better(X, Y, Z) becomes

((X < Y)? ((X < Z)? X: Z): (Y < Z)? Y: Z)
In this case, even though both expansions contain the same
number of < and ? characters, the "inefficient" version has
poorer control flow -- three conditionals are evaluated
fully 2/3 of the time, whereas with the "better" version
only two conditionals are ever executed.

<C++ only>
With C++ template functions, of course, it doesn't matter
so much. But if you're interested in efficiency, why are
you using functions? ;-)
</C++>

-Arthur
Jul 19 '05 #21
Irrwahn Grausewitz <ir*****@freenet.de> writes:
"Jeff" <no*****@notexist.com> wrote:
Please do not post off-topic things here. It waste the bandwidth and time.


Erm, (almost) the whole thread is cross-posted between c.l.c and c.l.c++


So any proposed solutions should work in both C and C++.
--
"...deficient support can be a virtue.
It keeps the amateurs off."
--Bjarne Stroustrup
Jul 19 '05 #22
Ben Pfaff <bl*@cs.stanford.edu> wrote:
Irrwahn Grausewitz <ir*****@freenet.de> writes:
"Jeff" <no*****@notexist.com> wrote:
>Please do not post off-topic things here. It waste the bandwidth and time.


Erm, (almost) the whole thread is cross-posted between c.l.c and c.l.c++


So any proposed solutions should work in both C and C++.


And one who is cross-posting complaints about off-topicality of
cross-posted replies to cross-posted questions should make clear
what the word "here" is referring to in this context.

--
What does this red button do?
Jul 19 '05 #23

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote in message news:Pine.LNX.4.55L-
Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.
I used inline functions. It's even worse if he used macros as
the expressions passed are possibly evaluated more than once.
In this case, even though both expansions contain the same
number of < and ? characters, the "inefficient" version has
poorer control flow -- three conditionals are evaluated
fully 2/3 of the time, whereas with the "better" version
only two conditionals are ever executed.
It's beyond me what you mean by that. Both times execute
the comparison twice, as a result the select. You can make
up your own idea of the cost of the flow between the two, but
as I said, it;s negligable. Both functions on the Sun compiler
take the same amount of time.
<C++ only>
With C++ template functions, of course, it doesn't matter
so much. But if you're interested in efficiency, why are
you using functions? ;-)
</C++>


Templates have no bearing on this situation at all. You could
as easily code this as functions taking doubles without templates
and the answer would be the same.
Jul 19 '05 #24

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote in message
news:Pi************************************@unix49 .andrew.cmu.edu...

(snip)
Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.

So we have, without the usual parentheses since they'd just
clutter the example:

#define min(a,b) ((a < b)? a: b)

#define min3_inefficient(a,b,c) min(a, min(b, c))

#define min3_better(a,b,c) (a < b)? min(a, c): min(b, c)
min3_inefficient(X, Y, Z) becomes

min(X, ((Y < Z)? Y: Z))

((X < ((Y < Z)? Y: Z))? X: ((Y < Z)? Y: Z)))
min3_better(X, Y, Z) becomes

((X < Y)? ((X < Z)? X: Z): (Y < Z)? Y: Z)
In this case, even though both expansions contain the same
number of < and ? characters, the "inefficient" version has
poorer control flow -- three conditionals are evaluated
fully 2/3 of the time, whereas with the "better" version
only two conditionals are ever executed.


Good compilers do common subexpression elimination, and hopefully will
notice that (Y<Z) occurs twice.

In any hand optimization problem, the question is always what will the
compiler find at want won't it find.

-- glen
Jul 19 '05 #25

On Wed, 10 Sep 2003, Ron Natalie wrote:

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote...
Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.
I used inline functions. It's even worse if he used macros as
the expressions passed are possibly evaluated more than once.


True; however, he did mention the *usual* definition of 'min',
which IME is more often than not as a macro.
In this case, even though both expansions contain the same
number of < and ? characters, the "inefficient" version has
poorer control flow -- three conditionals are evaluated
fully 2/3 of the time, whereas with the "better" version
only two conditionals are ever executed.


It's beyond me what you mean by that. Both times execute
the comparison twice, as a result the select.


Brain fart? :-)
Unsnipped from my previous post:

min3_inefficient(X, Y, Z) becomes
min(X, ((Y < Z)? Y: Z))
((X < ((Y < Z)? Y: Z))? X: ((Y < Z)? Y: Z)))

min3_better(X, Y, Z) becomes
((X < Y)? ((X < Z)? X: Z): (Y < Z)? Y: Z)
Suppose X is the least of the three... then
min3_inefficient compares Y to Z
then compares X to min(Y,Z)
min3_better compares X to Y
then compares X to Z

Suppose Y is the least of the three... then
min3_inefficient compares Y to Z
then compares X to Y
then compares Y to Z
min3_better compares X to Y
then compares Y to Z

Suppose Z is the least of the three... then
min3_inefficient compares Y to Z
then compares X to Z
then compares Y to Z
min3_better compares X to Y
then compares min(X,Y) to Z
See? min3_better makes exactly 2 comparisons in each case,
while min3_inefficient makes 3 comparisons fully 2/3 of the
time, as I said. Thus min3_inefficient *is* less efficient,
because it computes useless comparisons.

You can make
up your own idea of the cost of the flow between the two, but
as I said, it;s negligable. Both functions on the Sun compiler
take the same amount of time.


Try running them more than once.

(But before doing that, take a look at the generated machine
code. I would not be surprised if the GCC folks have optimized
this particular computation, so the Sun folks might have too.)

<C++ only>
With C++ template functions, of course, it doesn't matter
so much. But if you're interested in efficiency, why are
you using functions? ;-)
</C++>


Templates have no bearing on this situation at all. You could
as easily code this as functions taking doubles without templates
and the answer would be the same.


....except in the case where you wanted to compare pointers.
Or C++ std::strings. Or 'long longs'. Or practically anything
that wasn't a double.

(Which, incidentally, is why the most common implementation of
'min' is as a macro -- because C macros can do things that C
functions can't.)

-Arthur

Jul 19 '05 #26

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote in message news:Pi***********************************@unix45. andrew.cmu.edu...

On Wed, 10 Sep 2003, Ron Natalie wrote:

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote...
Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.
I used inline functions. It's even worse if he used macros as
the expressions passed are possibly evaluated more than once.


True; however, he did mention the *usual* definition of 'min',
which IME is more often than not as a macro.


Maybe it is in C, but it certainly IS NOT in C++.


See? min3_better makes exactly 2 comparisons in each case,
while min3_inefficient makes 3 comparisons fully 2/3 of the
time, as I said. Thus min3_inefficient *is* less efficient,
because it computes useless comparisons.


It is for the ugly macros, as I was saying, for inline functions it does
not need to generate a bogus third test.
Jul 19 '05 #27
Ron Natalie wrote:

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote in message news:Pi***********************************@unix45. andrew.cmu.edu...

On Wed, 10 Sep 2003, Ron Natalie wrote:

"Arthur J. O'Dwyer" <aj*@andrew.cmu.edu> wrote...
> Are you using functions, or macros? I'm sure that Peter
> was referring to the use of macros, in C -- *not* C++, for
> the benefit of those reading in c.l.c++.

I used inline functions. It's even worse if he used macros as
the expressions passed are possibly evaluated more than once.


True; however, he did mention the *usual* definition of 'min',
which IME is more often than not as a macro.


Maybe it is in C, but it certainly IS NOT in C++.


The following macro is a paradigm in C:

#define max(a, b) ((a) > (b) ? (a) : (b))

--
pete
Jul 19 '05 #28
Arthur J. O'Dwyer wrote:

On Wed, 10 Sep 2003, Ron Natalie wrote:

"Peter Nilsson" <ai***@acay.com.au> wrote...

> x = min( a, min( b, c ) );

Given a typical definition of min(), that will not produce an
efficient result.

#define min3(a,b,c) \
( (a) < (b) ? min(a,c) : min(b,c) )


The typical min is inlined to something like
a < b ? a : b

There's always two comparisons. Tests show no speed difference
between the two on my machine.


Are you using functions, or macros? I'm sure that Peter
was referring to the use of macros, in C -- *not* C++, for
the benefit of those reading in c.l.c++.

So we have, without the usual parentheses since they'd just
clutter the example:

#define min(a,b) ((a < b)? a: b)


It's illogical to remove required parentheses
and then insert extra one's that you like.
Minimally but correctly parenthesized:

#define min(a, b) ((b) > (a) ? a : (b))

--
pete
Jul 19 '05 #29

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: Sona | last post by:
I need to find a minimum of three float values.. what would be the most efficient way of doing this? Can someone please share a #define macro or something with me for doing this? Thanks Sona
3
by: Sona | last post by:
I need to find a minimum of three float values.. what would be the most efficient way of doing this? Can someone please share some code with me for doing this? Thanks Sona
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.