Coder Social home page Coder Social logo

xorshift128plus's People

Contributors

tacixat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xorshift128plus's Issues

Still fails at Chrome

I know you updated the code but the thing still prints unsat along with some array of numbers.

Find example below, and I did even tried with 10, 15, 600 length inputs but still doesn't work.

Input:

[ 0.3177472298521653, 0.27438638670402216, 0.9738289241644089, 0.24225661019352596, 0.40700607291649016]

Output:

BROWSER: chrome
[0.40700607291649016, 0.24225661019352596, 0.9738289241644089, 0.27438638670402216, 0.3177472298521653]
UNSAT

Code no longer works on chrome

No error messages besides unsat printing to the console. Happens with any numbers I use on chrome. Works on firefox every time though.

Global name 'BitVecs' is not defined

Hello!

When I run your code I have this error:

BROWSER: chrome
[0.8333085432653353, 0.08162196013326506, 0.4752549301773037]
Traceback (most recent call last):
File "main.py", line 186, in <module>
main()
File "main.py", line 152, in main
ostate0, ostate1 = BitVecs('ostate0 ostate1', 64)
NameError: global name 'BitVecs' is not defined

I'm using Python 2.7 and boto-2.49.0 z3-0.2.0 libs.

v8 implementation details

Hi there. There's an implementation detail of v8 that means that this only works for the first 1000 numbers generated or so, then itll start randomly encountering failures to work

The reason for this is a bug filed over here https://bugs.chromium.org/p/v8/issues/detail?id=8212 which probably explains it better

The tl;dr is that seeds in v8 are taken in a roundtrip through doubles (basically a reinterpret_cast), and every double is checked if its nan and the payload removed if it is nan (nan packing). This means that when the seeds are stored in the array at the end of each 62 long cycle, for this code to work correctly you actually need to check if they're any nan, and if they are, remove the payload (or set it to the default nan)

It does lead to a much shorter method to crack the rng though, which is while(Math.random() != 0.15567932943235995857);

error bitvecs not defined

$ python3 xs128p.py
BROWSER: chrome
[0.49965622623126693, 0.5106241305628436, 0.7895949638905317, 0.883588766746984, 0.5368584449767335]
Traceback (most recent call last):
  File "xs128p.py", line 207, in <module>
    main()
  File "xs128p.py", line 167, in main
    ostate0, ostate1 = BitVecs('ostate0 ostate1', 64)
NameError: name 'BitVecs' is not defined

Next Math.random() after Math.random()=0.7

Will it be possible to calculate the next random number of Math.random() after the next Math.rnadom that output 0.7.

Assuming the user got time and he wait for the below code completion, will it be possible to calculate its output?

while(Math.random() != 0.7)
;
console.log(Math.random());

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.