Skip to content

migrate opcode with one field less_than to general u16 limb constraints #1005

@hero78119

Description

@hero78119

This operation

ceno/ceno_zkvm/src/uint.rs

Lines 482 to 486 in a943e16

pub fn to_field_expr(&self, is_neg: Expression<E>) -> Expression<E> {
// Convert two's complement representation into field arithmetic.
// Example: 0xFFFF_FFFF = 2^32 - 1 --> shift --> -1
self.value() - is_neg * (1_u64 << 32)
}

are widely used in gadget, is_lt and signed, convert 2's complemented into field arithmetics. We need to review and make it support for prime field < u32

  • Branching...
  • Set Let Than...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions