• Resolved wordpressivan007

    (@wordpressivan007)


    Good afternoon!

    I try to use the PREC function, but it does not approximate it to 2 digits, it keeps showing me all the digits.

    Thank you

    Anibal

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @wordpressivan007,

    Your webpage includes multiple forms, and none of them uses the PREC operation.

    The PREC operation requires two parameters, the first one is the number to round, and the second one the number of decimal places.

    Could you let me know where are you using the PREC operation and how, please?

    Best regards.

    Thread Starter wordpressivan007

    (@wordpressivan007)

    Hello good day!

    I removed the PREC function since I could not make it work…

    I was using it like this:

    PREC(fieldname1+fieldname2)/fieldname3*100

    Tell me what I did wrong..

    Thank you

    Anibal

    Plugin Author codepeople

    (@codepeople)

    Hello @wordpressivan007,

    The use of the PREC operation would be:

    
    PREC((fieldname1+fieldname2)/fieldname3*100,2)
    

    PREC would be the outermost operation operation in the equation, and requires two parameters, the first one is the number to transform, and the second one the number of decimal places in the result.

    Best regards.

    Thread Starter wordpressivan007

    (@wordpressivan007)

    Hello!

    Ok, thank you

    Anibal

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PREC function’ is closed to new replies.