Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

reduce fractions

Featured Replies

I have a problem reducing my fraction to there lowest denominator. the calculation I found returns 2/64 instead of 1/32. I found this cal from earlier postings and I am a novice. the user are setting up equipment with the script and results should be in 64th,32nd,16th,8th,1/4th, and 1/2th,I need the fractions to break down to their simplest forms.

Case(

GetAsNumber(Cut 1Adecimal)<.015625; "";

Mod(Cut 1Adecimal*2;1)<.015625; "1/2";

Mod(Cut 1Adecimal*4;1)<.015625; Round(Cut 1Adecimal*4;0) & "/4";

Mod(Cut 1Adecimal*8;1)<.015625; Round(Cut 1Adecimal*8;0) & "/8";

Mod(Cut 1Adecimal*16;1)<.015625; Round(Cut 1Adecimal*16;0) & "/16";

Mod(Cut 1Adecimal*32;1)<.015625; Round(Cut 1Adecimal*32;0) & "/32";

Round(Cut 1Adecimal*64;0) & "/64")

I can't see why your calculation goes wrong but it may be better to get rid of the extraneous extra bits right at the start. I am assuming from your calculation that the field Cut 1Adecimal has a value between 0 and 1. In the calculation which I have checked to some extent in v8 I have abbreviated the field to CAD (look out for semi-colons which I have not converted to commas)

Case(

Int(CAD*64) < 1,"",

Mod(Int(CAD*64),32) = 0, "1/2",

Mod(Int(CAD*64),16) = 0;Div(Int(CAD*64),16) & "/4",

Mod(Int(CAD*64),8) = 0, Div(Int(CAD*64);8) & "/8",

Mod(Int(CAD*64);4) = 0, Div(Int(CAD*64);4) & "/16",

Mod(Int(CAD*64),2) = 0, Div(Int(CAD*64),2) & "/32",

Int(CAD*64) & "/64")

This is effectively the same calculation but written in a slightly different format trying to use integer arithmetic. Note that it always goes down to the nearest appropriate fraction. For example, 0.3125 gives 1/32 and 0.3124 gives 1/64

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.