473,324 Members | 1,856 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,324 software developers and data experts.

Double Jeopoardy

d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on a
text or binary compare?

Why?

Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2) then
we could order arrays of numbers by using the Wizhook.SortStringArray
method.

Why would I want to do that? ... No particular reason ... I have a bunch of
other sorting procedures.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #1
14 1961
WizHook is in A03 so it's safe to use for a while even though it's hidden
and undocumented.

Interesting talk about it here though:
http://www.utteraccess.com/forums/ac...ess561560.html

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn******************@130.133.1.4...
d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on a
text or binary compare?

Why?

Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2) then we could order arrays of numbers by using the Wizhook.SortStringArray
method.

Why would I want to do that? ... No particular reason ... I have a bunch of other sorting procedures.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #2
Lyle Fairfield wrote:
d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on a
text or binary compare?

Why?

Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2) then
we could order arrays of numbers by using the Wizhook.SortStringArray
method.

Why would I want to do that? ... No particular reason ... I have a bunch of
other sorting procedures.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)


Since they are different storage mediums (ex...how many times do you get the
first 3 bytes of a double?) I would suggest you store them into a string left
padded. Since that method adds overhead, I doubt I'd use it.

We've seen where 1,10,100 come before 2, 20, 200 in a string sort....unless
padded.

Nov 12 '05 #3
Salad <oi*@vinegar.com> wrote in news:40***************@vinegar.com:
Lyle Fairfield wrote:
d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode
here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on
a text or binary compare?

Why?

Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2)
then we could order arrays of numbers by using the
Wizhook.SortStringArray method.

Why would I want to do that? ... No particular reason ... I have a
bunch of other sorting procedures.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)


Since they are different storage mediums (ex...how many times do you get
the first 3 bytes of a double?) I would suggest you store them into a
string left padded. Since that method adds overhead, I doubt I'd use
it.

We've seen where 1,10,100 come before 2, 20, 200 in a string
sort....unless padded.


sigh ...

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4
On Jan 19 2004, 01:58 pm, Lyle Fairfield <Mi************@Invalid.Com>
wrote in news:Xn******************@130.133.1.4:
Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2)
then we could order arrays of numbers by using the
Wizhook.SortStringArray method.
This wouldn't be particularly fast, having first allocate strings then sort
them. So I'd stick with those other procedures. Note that this doesn't
answer your original question.
Why would I want to do that? ... No particular reason ... I have a
bunch of other sorting procedures.


--
(remove a 9 to reply by email)
Nov 12 '05 #5
Thoughts only ...

Depends on how you do the copying, Windows systems are little endian so the
bytes are stuffed in from the left hand side, if you just CopyMemory this it
will be the wrong way around.

Doubles are IEEE 8 byte floating numbers so you would also have a problem
with the sign bit.
Terry

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn******************@130.133.1.4...
d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on a
text or binary compare?

Why?

Why do I ask? Well, if we could prove that this is so (s1<s2 => d1<d2) then we could order arrays of numbers by using the Wizhook.SortStringArray
method.

Why would I want to do that? ... No particular reason ... I have a bunch of other sorting procedures.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #6

On Tue, 20 Jan 2004 16:48:09 -0000, "Terry Kreft"
<te*********@mps.co.uk> wrote in comp.databases.ms-access:
Doubles are IEEE 8 byte floating numbers so you would also have a problem
with the sign bit.


Not really. Lyle made clear he was dealing solely with positive
numbers. The sign bit is zero for positive numbers and 1 for negative
numbers, so its a non-issue for the given problem.

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #7

Lyle,

On 19 Jan 2004 18:58:44 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote in comp.databases.ms-access:
d1 and d2 are numbers we can store as doubles (8 bytes).

d1 > 0
d2 > 0
d1 < d2

Now s1 and s2 are strings of length 8 bytes. (We can ignore unicode here).

Into s1 and s2 we copy the 8 bytes from d1 and d2 respectively.

Does it follow that s1<s2, (or s1 is ordered before s2) when sorted on a
text or binary compare?

Why?


Who cares why!

Knowledge for knowledge's sake, right? Isn't that good enough a
reason?

As long as you make sure you get the byte order correct, you can do as
you suggest and compare double values as strings. But since, in
vb/vba, you can't simply cast one value as another as you could in c,
c++, pascal etc, how are you doing the psudeo-casting? If you're,
say, reading in the values from a file, its trivial (just read an
eight byte string at the i/o point where the double is stored) but if
you're working solely in memory (ie you have a double variable, and
you store it in a string) then the manner used is, of course,
critical. If you can clarify how you're doing the casting, I can give
a clearer answer on whether there'd be any problems.

But two quick points are already clear. (1), a binary comparison is
preferable and (2) working with double values as strings will be
slower than leaving them as doubles.
Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #8
Peter Miller <pm*****@pksolutions.com> wrote in
news:gq********************************@4ax.com:
As long as you make sure you get the byte order correct, you can do as
you suggest and compare double values as strings. But since, in
vb/vba, you can't simply cast one value as another as you could in c,
c++, pascal etc, how are you doing the psudeo-casting?


API CopyMemory

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #9
On 21 Jan 2004 03:36:31 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote:

That seems risky, because of the byte layout, which is not as innocent
people (not sure that includes you :-)) might expect.
As a test, use the longint &HAABBCCDD&, CopyMemory it, and observe
you're not getting the characters for &HAA, &HBB etc in that order.

-Tom.

Peter Miller <pm*****@pksolutions.com> wrote in
news:gq********************************@4ax.com :
As long as you make sure you get the byte order correct, you can do as
you suggest and compare double values as strings. But since, in
vb/vba, you can't simply cast one value as another as you could in c,
c++, pascal etc, how are you doing the psudeo-casting?


API CopyMemory


Nov 12 '05 #10
Tom van Stiphout <to*****@no.spam.cox.net> wrote in
news:nm********************************@4ax.com:
On 21 Jan 2004 03:36:31 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote:

That seems risky, because of the byte layout, which is not as innocent
people (not sure that includes you :-)) might expect.
As a test, use the longint &HAABBCCDD&, CopyMemory it, and observe
you're not getting the characters for &HAA, &HBB etc in that order.

-Tom.


My not so carefully checked or documented code ...

I start with strings here only because I want to test to be sure I get back
to the right strings. Of course later, I will start directly from the
doubles.

Option Base 0
Option Explicit

Private Declare Sub CopyMemory _
Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Any, Source As Any, ByVal Length As Long)

Public Sub test()

Dim aByteArrays() As Byte
Dim aBytes() As Byte
Dim aDoubles(0 To 2) As Double
Dim aStrings(0 To 2) As String

Dim lngIterator As Long
Dim lngOutsideIterator As Long
Dim lngInsideIterator As Long
Dim strDummy As String
Dim strMessage As String

aStrings(0) = "QRSTUVWX"
aStrings(1) = "IJKLMNOP"
aStrings(2) = "ABCDEFGH"

'Store the 8 bytes in a Byte Array
ReDim aByteArrays(8 * (UBound(aStrings) - LBound(aStrings) + 1))
For lngIterator = 0 To 2
aBytes = StrConv(aStrings(lngIterator), vbFromUnicode)
CopyMemory aByteArrays(8 * lngIterator), aBytes(0), 8
Next

' first check
' do we have the right bytes in the byte arrays
strMessage = "Original Strings" & vbTab
For lngOutsideIterator = 0 To 2
strDummy = ""
For lngInsideIterator = 0 To 7
strDummy = strDummy & Chr$(aByteArrays(lngInsideIterator +
lngOutsideIterator * 8))
Next lngInsideIterator
strMessage = strMessage & strDummy & vbTab
Next lngOutsideIterator
' we get the original three strings
' so it seems we can store these chars as bytes

' now to create the doubles

strMessage = strMessage & vbNewLine & "AS Doubles" & vbTab
For lngIterator = 0 To 2
CopyMemory aDoubles(lngIterator), aByteArrays(8 * lngIterator), 8
strMessage = strMessage & aDoubles(lngIterator) & vbTab
Next lngIterator

' we should now have the double equivalent of our strings
' this will show us the double for which the bytes corresponding
' to "ABCDEFG" ar stored

' now reverse the process to convert these back into Byte Arrays
For lngIterator = 0 To 2
CopyMemory aByteArrays(8 * lngIterator), aDoubles(lngIterator), 8
Next lngIterator

'and convert those byte arrays back to Strings
strMessage = strMessage & vbNewLine & "Back to Strings" & vbTab
For lngIterator = 0 To 2
CopyMemory aBytes(0), aByteArrays(8 * lngIterator), 8
aStrings(lngIterator) = StrConv(aBytes, vbUnicode)
strMessage = strMessage & aStrings(lngIterator) & vbTab
Next lngIterator

' OK let's sort the string array
With WizHook
.Key = 51488399
.SortStringArray aStrings
End With

' lets check and see if it was sorted correctly
strMessage = strMessage & vbNewLine & "Strings Sorted" & vbTab
For lngIterator = 0 To 2
strMessage = strMessage & aStrings(lngIterator) & vbTab
Next lngIterator

' so far ... so good

' Now
' lets convert the strings back to doubles
' put the 8 bytes from each string back into the byte arrays
For lngIterator = 0 To 2
aBytes = StrConv(aStrings(lngIterator), vbFromUnicode)
CopyMemory aByteArrays(8 * lngIterator), aBytes(0), 8
Next

' and put the bytes back into the double storage
strMessage = strMessage & vbNewLine & "Doubles Sorted" & vbTab
For lngIterator = 0 To 2
CopyMemory aDoubles(lngIterator), aByteArrays(8 * lngIterator), 8
strMessage = strMessage & aDoubles(lngIterator) & vbTab
Next lngIterator

' are they sorted
strMessage = strMessage & vbNewLine
If (aDoubles(0) <= aDoubles(1)) Then
strMessage = strMessage & vbNewLine & aDoubles(0) & " <= " &
aDoubles(1)
Else
strMessage = strMessage & vbNewLine & aDoubles(0) & " IS NOT <= " &
aDoubles(1)
End If
If (aDoubles(1) <= aDoubles(2)) Then
strMessage = strMessage & vbNewLine & aDoubles(1) & " <= " &
aDoubles(2)
Else
strMessage = strMessage & vbNewLine & aDoubles(1) & " IS NOT <= " &
aDoubles(2)
End If

strMessage = strMessage & vbNewLine & vbNewLine _
& "Yes, I know I did a million unnecessary things " _
& vbNewLine _
& "and you could probably figure out why!"
MsgBox strMessage

End Sub

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #11
This code has a lot of problems in it, not least of all the fact that it
takes Unicode strings and converts them to Unicode (making "double Unicode",
an encoding not found in nature!).
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
Tom van Stiphout <to*****@no.spam.cox.net> wrote in
news:nm********************************@4ax.com:
On 21 Jan 2004 03:36:31 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote:

That seems risky, because of the byte layout, which is not as innocent
people (not sure that includes you :-)) might expect.
As a test, use the longint &HAABBCCDD&, CopyMemory it, and observe
you're not getting the characters for &HAA, &HBB etc in that order.

-Tom.
My not so carefully checked or documented code ...

I start with strings here only because I want to test to be sure I get

back to the right strings. Of course later, I will start directly from the
doubles.

Option Base 0
Option Explicit

Private Declare Sub CopyMemory _
Lib "kernel32" Alias "RtlMoveMemory" _
(Destination As Any, Source As Any, ByVal Length As Long)

Public Sub test()

Dim aByteArrays() As Byte
Dim aBytes() As Byte
Dim aDoubles(0 To 2) As Double
Dim aStrings(0 To 2) As String

Dim lngIterator As Long
Dim lngOutsideIterator As Long
Dim lngInsideIterator As Long
Dim strDummy As String
Dim strMessage As String

aStrings(0) = "QRSTUVWX"
aStrings(1) = "IJKLMNOP"
aStrings(2) = "ABCDEFGH"

'Store the 8 bytes in a Byte Array
ReDim aByteArrays(8 * (UBound(aStrings) - LBound(aStrings) + 1))
For lngIterator = 0 To 2
aBytes = StrConv(aStrings(lngIterator), vbFromUnicode)
CopyMemory aByteArrays(8 * lngIterator), aBytes(0), 8
Next

' first check
' do we have the right bytes in the byte arrays
strMessage = "Original Strings" & vbTab
For lngOutsideIterator = 0 To 2
strDummy = ""
For lngInsideIterator = 0 To 7
strDummy = strDummy & Chr$(aByteArrays(lngInsideIterator +
lngOutsideIterator * 8))
Next lngInsideIterator
strMessage = strMessage & strDummy & vbTab
Next lngOutsideIterator
' we get the original three strings
' so it seems we can store these chars as bytes

' now to create the doubles

strMessage = strMessage & vbNewLine & "AS Doubles" & vbTab
For lngIterator = 0 To 2
CopyMemory aDoubles(lngIterator), aByteArrays(8 * lngIterator), 8
strMessage = strMessage & aDoubles(lngIterator) & vbTab
Next lngIterator

' we should now have the double equivalent of our strings
' this will show us the double for which the bytes corresponding
' to "ABCDEFG" ar stored

' now reverse the process to convert these back into Byte Arrays
For lngIterator = 0 To 2
CopyMemory aByteArrays(8 * lngIterator), aDoubles(lngIterator), 8
Next lngIterator

'and convert those byte arrays back to Strings
strMessage = strMessage & vbNewLine & "Back to Strings" & vbTab
For lngIterator = 0 To 2
CopyMemory aBytes(0), aByteArrays(8 * lngIterator), 8
aStrings(lngIterator) = StrConv(aBytes, vbUnicode)
strMessage = strMessage & aStrings(lngIterator) & vbTab
Next lngIterator

' OK let's sort the string array
With WizHook
.Key = 51488399
.SortStringArray aStrings
End With

' lets check and see if it was sorted correctly
strMessage = strMessage & vbNewLine & "Strings Sorted" & vbTab
For lngIterator = 0 To 2
strMessage = strMessage & aStrings(lngIterator) & vbTab
Next lngIterator

' so far ... so good

' Now
' lets convert the strings back to doubles
' put the 8 bytes from each string back into the byte arrays
For lngIterator = 0 To 2
aBytes = StrConv(aStrings(lngIterator), vbFromUnicode)
CopyMemory aByteArrays(8 * lngIterator), aBytes(0), 8
Next

' and put the bytes back into the double storage
strMessage = strMessage & vbNewLine & "Doubles Sorted" & vbTab
For lngIterator = 0 To 2
CopyMemory aDoubles(lngIterator), aByteArrays(8 * lngIterator), 8
strMessage = strMessage & aDoubles(lngIterator) & vbTab
Next lngIterator

' are they sorted
strMessage = strMessage & vbNewLine
If (aDoubles(0) <= aDoubles(1)) Then
strMessage = strMessage & vbNewLine & aDoubles(0) & " <= " &
aDoubles(1)
Else
strMessage = strMessage & vbNewLine & aDoubles(0) & " IS NOT <= " & aDoubles(1)
End If
If (aDoubles(1) <= aDoubles(2)) Then
strMessage = strMessage & vbNewLine & aDoubles(1) & " <= " &
aDoubles(2)
Else
strMessage = strMessage & vbNewLine & aDoubles(1) & " IS NOT <= " & aDoubles(2)
End If

strMessage = strMessage & vbNewLine & vbNewLine _
& "Yes, I know I did a million unnecessary things " _
& vbNewLine _
& "and you could probably figure out why!"
MsgBox strMessage

End Sub

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #12

Lyle,

On 21 Jan 2004 10:22:17 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote in comp.databases.ms-access:
My not so carefully checked or documented code ...


I took as a starting point an array of 10,000 random double values,
and saw that wizhook.sortstringarray failed miserably.

This is just my 2c, but here's my take on your approach:

1) Are you sure wizhook's sortstringarray method does a straight
binary comparison? Being largely undocumented, I haven't been able to
verify this. Your sample test is, of course, trivial, since you start
with simple clear strings.

2) How does sortstringarray handle null bytes? Null bytes aren't
present in your sample code, of course, but would not be uncommon in
the bytes of a double. Since a null byte typically implies the end of
a string, sortstringarray may well stop looking at the remaining bytes
of a double that has a null byte in its midst.

3) I was surprised to see that sortstringarray is generally pretty
quick. I expected it to clearly lag behind even a vba-based shell
sort. So my initial impression that it failed on speed alone,
regardless of whether it was appropriate for use with converted
doubles, was mistaken. Its still not as efficient as a properly
implemented sort of the double array, and you still have the overhead
of converting from doubles and back again, but its not ridiculously
slow.

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #13
Peter Miller <pm*****@pksolutions.com> wrote in
news:an********************************@4ax.com:

Lyle,

On 21 Jan 2004 10:22:17 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote in comp.databases.ms-access:
My not so carefully checked or documented code ...


I took as a starting point an array of 10,000 random double values,
and saw that wizhook.sortstringarray failed miserably.

This is just my 2c, but here's my take on your approach:

1) Are you sure wizhook's sortstringarray method does a straight
binary comparison? Being largely undocumented, I haven't been able to
verify this. Your sample test is, of course, trivial, since you start
with simple clear strings.

2) How does sortstringarray handle null bytes? Null bytes aren't
present in your sample code, of course, but would not be uncommon in
the bytes of a double. Since a null byte typically implies the end of
a string, sortstringarray may well stop looking at the remaining bytes
of a double that has a null byte in its midst.

3) I was surprised to see that sortstringarray is generally pretty
quick. I expected it to clearly lag behind even a vba-based shell
sort. So my initial impression that it failed on speed alone,
regardless of whether it was appropriate for use with converted
doubles, was mistaken. Its still not as efficient as a properly
implemented sort of the double array, and you still have the overhead
of converting from doubles and back again, but its not ridiculously
slow.


After a bit of experimentation I suspect that (as you guess)
SortStringArray does not handle null bytes as we might hope or expect.

It seems to sort

1. null.B.B.B
2. null.null.B.B
3. null.null.null.B
4. null.null.null.null
5. B.B.B.B

in that order: 1,2,3,4,5,

I think one might have expected 4,3,2,1,5.

so ... I guess my plan could not work without some mapping of null bytes to
.... what?

If we map them to anything else how would we differentiate that anything
else which is really a zero, to the anything else that is really the
anything else?

We'd have to have a mirrow array, perhaps, showing which anything elses
were legitimate, and which were really zeroes. This is likely to take any
usefulness away from the procedure.

A far as learning ... I found that I could not INSERT a record with a field
value set to vbNullChar & other characters in SQL, but that I could cut and
paste a vbNullChar & other characters value to a text field. I tried a
binary field as well, but the results were the same.

Time for some real work now ...
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #14

On 22 Jan 2004 02:50:49 GMT, Lyle Fairfield
<Mi************@Invalid.Com> wrote in comp.databases.ms-access:
so ... I guess my plan could not work without some mapping of null bytes to
... what?
Nothing. Every other byte value is possible in an actual double
value, so there's no 'marker' values to spare.

I also did a little poking around, and found that the sort is not
remotely binary in nature. All variants of 'e', for instance (upper,
lower, various accents) occur before all values of 'f', and so on.
Absolutely useless for binary comparisons. Of course, 'option compare
binary' doesn't help with this wizhook method.
Time for some real work now ...


Aw, that's no fun...

Peter Miller
__________________________________________________ __________
PK Solutions -- Data Recovery for Microsoft Access/Jet/SQL
Free quotes, Guaranteed lowest prices and best results
www.pksolutions.com 1.866.FILE.FIX 1.760.476.9051
Nov 12 '05 #15

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

Similar topics

12
by: Sydex | last post by:
When I compile code I get error C2664: 'Integration::qgaus' : cannot convert parameter 1 from 'double (double)' to 'double (__cdecl *)(double)' in this part : double Integration::quad2d(double...
20
by: Anonymous | last post by:
Is there a non-brute force method of doing this? transform() looked likely but had no predefined function object. std::vector<double> src; std::vector<int> dest; ...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
10
by: Robert Palma | last post by:
I'm having trouble figuring out how to pass a pointer to a double array (1 dimensional) to a C function. Declaring array as: double xx; Declaring func. int process( double *input ) Calling...
10
by: Bryan Parkoff | last post by:
The guideline says to use %f in printf() function using the keyword float and double. For example float a = 1.2345; double b = 5.166666667; printf("%.2f\n %f\n", a, b);
3
by: BlueTrin | last post by:
I am using a DLL written in C, it uses some pointers on functions, I have defined a wrapper around it in C# which uses some delegates: #region Delegates and Marshalling to call solvopt public...
67
by: lcw1964 | last post by:
This may be in the category of bush-league rudimentary, but I am quite perplexed on this and diligent Googling has not provided me with a clear straight answer--perhaps I don't know how to ask the...
1
by: JWest46088 | last post by:
I keep getting these error messages: area(double,double) in Rectangle cannot be applied to () return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ...
2
by: Genro | last post by:
#include<stdio.h> #include<TX/graphics.h> #include<time.h> // I need help! struct Krug{ double _x; double _y; double _skox; double _skoy; double...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.