Code Monkey home page Code Monkey logo

Comments (8)

terrillmoore avatar terrillmoore commented on June 12, 2024 1

As mentioned in #10, I made an Excel spreadsheet that takes the result from a web DFFT and calculates magnitudes, and then counts the number of items < sqrt(3*n*n) (or their slightly smaller constant * n * n).

I can't repro the 46 either way. I get 48 if using "correct" floating point magnitudes, and 47 if simulating the apparently buggy reduction.

from nist-statistical-test-suite.

TyeolRik avatar TyeolRik commented on June 12, 2024

And also I found the "Out of Bound" Error in for loop which is in line 41~42 ./sts/src/discreteFourierTransform.c

for ( i=0; i < n/2; i++ )
    m[i+1] = sqrt(pow(X[2*i+1],2)+pow(X[2*i+2],2));

This line will cause unexpected behavior.
Let's think n = 10, then maximum i will be 4. because i < 10/2
2 * i + 2 = 2 * 4 + 2 = 10 then, but, the range of X is [0, 9] So, this is out of bound.


As far as I know, this is out of bound. And also in C, X[n] would be un-initialized value. (It could be dump variable)
Is there any reason that I don't know C grammer?

from nist-statistical-test-suite.

terrillmoore avatar terrillmoore commented on June 12, 2024

Hi @TyeolRik thanks for your comment. I think you should submit the second comment (out of bound error) as a separate issue.

I'm not familiar with the referenced document; if there's a link, please post. It does appear that you've found an issue given your checks; but as I'm not the author of the code or the document, I can't comment intelligently. Maybe we should see if the NIST people have a better repo now to refer to; in the last few years, a lot has changed.

from nist-statistical-test-suite.

TyeolRik avatar TyeolRik commented on June 12, 2024

Hi @TyeolRik thanks for your comment. I think you should submit the second comment (out of bound error) as a separate issue.

I'm not familiar with the referenced document; if there's a link, please post. It does appear that you've found an issue given your checks; but as I'm not the author of the code or the document, I can't comment intelligently. Maybe we should see if the NIST people have a better repo now to refer to; in the last few years, a lot has changed.

Thank you. I opened a new issue about this. (For loop out of bound problem)
Then, shall I delete the second comment which is about for loop?

from nist-statistical-test-suite.

TyeolRik avatar TyeolRik commented on June 12, 2024

Hi @TyeolRik thanks for your comment. I think you should submit the second comment (out of bound error) as a separate issue.

I'm not familiar with the referenced document; if there's a link, please post. It does appear that you've found an issue given your checks; but as I'm not the author of the code or the document, I can't comment intelligently. Maybe we should see if the NIST people have a better repo now to refer to; in the last few years, a lot has changed.

And also, there is PDF file, referenced document, in your repository, assets/nistspecialpublication800-22r1a.pdf.
You can see Page 36 and Page 69 for detail calculation.

from nist-statistical-test-suite.

terrillmoore avatar terrillmoore commented on June 12, 2024

Thanks... as you might gather, I'm a curator, not a developer, on this particular repo. I had forgotten that I'd tracked that down! I'll take a look if I have time.

from nist-statistical-test-suite.

terrillmoore avatar terrillmoore commented on June 12, 2024

Then, shall I delete the second comment which is about for loop?

Up to you. You could just edit it and put in strike-throughs and link to the new issue; or leave it as is; Github is already pointing to the issue.

from nist-statistical-test-suite.

terrillmoore avatar terrillmoore commented on June 12, 2024

Closing this, as I think it's answered. Reopen if needed.

from nist-statistical-test-suite.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.