Skip to content

Bad output in witness file #633

Answered by alexander-camuto
guyu96 asked this question in Q&A
Discussion options

You must be logged in to vote

Ah sorry had just copy pasted one of our tests -- hash has nothing to do with it.

ezkl.float_to_vecu64 scales up the provided input using the passed in scale (in your case 7 -- so 1 -> 1 * 2^7 = 128). This is to reduce numerical accuracy loss when converting floating point numbers to field elements

If you want to round trip the serialization in full you can use ezkl.vecu64_to_float and pass in the used scale (in this case 7):

ezkl.vecu64_to_float(x, 7)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@guyu96
Comment options

@alexander-camuto
Comment options

Answer selected by alexander-camuto
@guyu96
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants