## Search found 2925 matches

Aug 17, 2007 11:35
Forum: Projects
Topic: Sqaure Wave Synthesis Harmonic Editor
Replies: 18
Views: 10306
Yes, square waves are noisy because they have steps generating all those harmonics to infinity. We have to remove every odd harmonic of the first square wave by subtracting another square wave and introducing even more smaller odd harmonics. The best way to generate smooth signals is to use sine wav...
Aug 17, 2007 5:27
Forum: Projects
Topic: Sqaure Wave Synthesis Harmonic Editor
Replies: 18
Views: 10306
This will give you some idea of the problems associated with generating smooth functions from squarewaves. Fiddle with the parameters n and f etc. Have fun. I am not certain the code is absolutely correct, but it seems to work like I expect. EDIT: the following code is faulty, see my Walsh Transform...
Aug 16, 2007 18:55
Forum: Projects
Topic: Sqaure Wave Synthesis Harmonic Editor
Replies: 18
Views: 10306
Infinite precision is not needed. This is fundamentally a problem of bandwidth. The entire universe respects the laws of information theory and data channel capacity, why should you be allowed to break them? Const Harmonics As Integer = 32 Const VEWidth As Integer = 768 Your input is 32 column bars....
Aug 16, 2007 10:00
Forum: Projects
Topic: Sqaure Wave Synthesis Harmonic Editor
Replies: 18
Views: 10306
What you are doing is synthesising step waveforms using “Walsh-Hadamard” functions or transforms. These square waves are often called Sal and Cal after their sinewave equivalents the Sin and Cos fourier or trigonometric functions. Although square waves are composed of only the odd n harmonics of (si...
Aug 11, 2007 12:51
Forum: General
Topic: ASM matrix multiplication
Replies: 15
Views: 2621
Good one there MichaelW. Joshy will be pleased. Well solved. The solution came from the indirect [eax] not from the Byval. The speed increase looks like only up by 20% but the output accuracy has fallen off from 8 digits to 4. I think this is due to the FB Sqr(double precision) compared with rsqrtps...
Aug 11, 2007 11:22
Forum: General
Topic: Math question
Replies: 6
Views: 1159
' if Vout = Fix((1 + pct) * Vin) ' then Vin = Fix((Vout + 1) / (1 + pct)) ' maths is correct ' test as follows for non negative inputs Dim As Single pct=0.2 Dim As Integer Vin, Vout, Vfin For Vin = 0 To 25000 Vout=Fix((1 + pct) * Vin) Vfin=Fix...
Aug 11, 2007 10:55
Forum: General
Topic: ASM matrix multiplication
Replies: 15
Views: 2621
The assembly code seems to be correct to me. Why does changing the order of the two test loops give output data = zero for the ASM code? I think it is something to do with passing the pointers to the “Sub ASM_normal(“ code because the data is not being transfered. The results claimed from ASM were a...
Aug 11, 2007 8:25
Forum: General
Topic: ASM matrix multiplication
Replies: 15
Views: 2621
Why does changing the order of the two test loops give zero data output for the ASM code? Why does the ASM code always run in 2usec no matter how many loops? Sub ASM_normal(outv3 As Single Ptr,_ inv3 As Single Ptr) asm movups xmm0,[inv3] movaps xmm2, xmm0 mulps xmm0, xmm0 movaps xmm1, xmm0 s...
Aug 11, 2007 8:07
Forum: General
Topic: ASM matrix multiplication
Replies: 15
Views: 2621
If this was a fair speed test you would expect a reasonably independence of number of test loops executed to factor. This is not the case so I suspect the operating system is time sliceing the code differently or something weird like that ? Number of loops : Factor 1e1 : 0.85 1e2 : 2.2 1e3 : 22. 1e4...
Aug 10, 2007 23:29
Forum: General
Topic: Bug report
Replies: 16
Views: 2930
General observations and guidelines: There is little point in wasting any time calling someone an idiot whether or not they use this forum. Unfortunately such behaviour will be copied and amplified by others. Abuse has to be typed in, others then have to read it. Abusers are not only wasting their t...
Aug 10, 2007 2:26
Forum: General
Topic: Decimal Point Problem
Replies: 22
Views: 4551
A request has now been submitted.
Aug 09, 2007 20:36
Forum: General
Topic: Decimal Point Problem
Replies: 22
Views: 4551
The problem with an Approx(x,y,e) function is that it is inflexible. Each situation where it might be used is different. Sometimes subtraction would be applicable, sometimes division. For example the test… If Abs((x-y)/(x+y))< e Then …might work often but it will still catch you out sometimes. Analy...
Aug 09, 2007 0:00
Forum: General
Topic: Decimal Point Problem
Replies: 22
Views: 4551
It is good policy with floating point numbers never to test exact equality or inequality. (Division by zero is handled by an internal representation of infinite, 1.#INF and -1.#INF ). You will find that comparing >, >=, < or <= are all you need with floating point number programming. If you need to ...
Aug 02, 2007 12:02
Forum: Documentation
Topic: List of Wiki Pages that MAY need updating
Replies: 16
Views: 6038
Some pages in FB-manual-chm-02.jul.2007.chm have been left behind in the revision process. The pages do not specify if Line numbers or OnGoto are supported in –lang fb. See: “Programmers Reference / Lexical Conventions / Labels” and “Control Flow Statements / Transferring Statements” are missing dia...
Aug 02, 2007 2:01
Forum: General
Topic: String Functions
Replies: 1
Views: 847
Answer 1. String(Lof(h), 0) makes a string of zero valued bytes the same length as the file #h. Any character or byte value could be assigned since it will be overwritten by the file data. The string clearly exists in memory and you may use it for the contents of the file. The number of characters r...