• Resolved ryansvfx

    (@ryansvfx)


    Hi. Is it possible to set a number box as a fraction? what i want to do is have 2 boxes. 1 for a fractional number and a second for a decimal number. is it possible to do this so that if i type a fraction in the fraction box, it automatically gives the decimal equivalent in the decimal box, and vice versa?

    the equation i need to convert them is: (numerator/denominator) + 1 = decimal odds

    for example here is the equation with numbers: (36/5) + 1 = 8.20

    • This topic was modified 3 years, 11 months ago by ryansvfx.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @ryansvfx

    Yes, that’s possible. You can insert a “Single Line Text” field in the form for entering the fraction, for example, I’ll assume it is the fieldname1, and then insert a calculated field with the equation:

    eval(fieldname1)+1

    Best regards.

    Thread Starter ryansvfx

    (@ryansvfx)

    that’s great. if I was to reverse the equation is it possible to bring a result back displayed as a fraction? im still trying to work out the formula to return the correct fraction, i have a guide below, but i just want to check that a fraction can be returned as a result.

    The guide I’m following is below.

    Converting decimal odds to fractional odds

    It’s all about multiplying the decimal odds until you manage to get rid of both decimal places. We will reverse engineer the examples above to explain this fully.

    We have already established that 9/4 fractional odds is 3.25 in decimal. To prove this, we would have to do the following sum, whilst remembering that we need to eliminate the decimal places.

    3.25 – Decimal places exist. Therefore, we add 3.25 on again.
    3.25 + 3.25 = 7.50 – Decimal places exist. Therefore, we add 3.25 on again.
    3.25 + 3.25 + 3.25 = 9.75 – Decimal places exist. Therefore, we add 3.25 on again.

    3.25 + 3.25 + 3.25 + 3.25 = 13.00 – Decimal places now gone! First part done.

    Now that we have a number with no decimal places, we can work out the fraction. As you can see, we had to multiply 3.25 four times in order to eliminate the decimal places. So, we deduct four from thirteen – this being the sum of adding 3.25 together four times.

    13 – 4 = 9

    The fractional odds would then be the result of the sum directly above this sentence – 9 – over the number of times the decimal was multiplied – 4.

    9/4`

    • This reply was modified 3 years, 11 months ago by ryansvfx.
    Plugin Author codepeople

    (@codepeople)

    Hello @ryansvfx

    I’m sorry, the support does not cover the implementation of the users’ projects (forms or formulas). If you need me implement your equations, please, do not hesitate to contact me through my private website: Click Here

    Best regards.

    • This reply was modified 3 years, 11 months ago by codepeople.
    Thread Starter ryansvfx

    (@ryansvfx)

    thanks, i have message you.

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