Skip to content

Add formula generation for equ,neq,geq,leq,dgs and a command suggestion #383

Open
@loader3229

Description

@loader3229

Add formula generation for equ,neq,geq,leq,dgs
equ $0,$1 -> ($0 == $1)
neq $0,$1 -> ($0 != $1)
geq $0,$1 -> ($0 >= $1)
leq $0,$1 -> ($0 <= $1)
dgs $0,$1 -> sumdigits($0,$1) for positive $0
dgs $0,$1 -> sumdigits($0,$1)*sign($0) for all $0
Also, a command suggestion: cmp $0,$1: compare $0,$1, if $0>$1 set $0 to 1;if $0<$1 set $0 to -1;if $0 equals $1 set $0 to 0; formula: sign($0-$1)
per $0,$1: compute Permutation coefficient (choose $1 items in $0 different items, different permutations): $0 := ($0-0)($0-1)($0-2)($0-3)...($0-$1+1), if $1 is 0 set $0 to 1, if $1 is negative set $0 to 0. formula for non-negative $0 and $0-$1: floor($0!/($0-$1)!)
These formulas are compatible with the PARI/GP syntax.

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