Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4542158
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:20:57+00:00 2026-05-21T15:20:57+00:00

Ideally I could specify something like 10 as my input (in ounces) and get

  • 0

Ideally I could specify something like 10 as my input (in ounces) and get back a string like this: “1 & 1/4 cups”. Is there a library that can do something like this? (note: I am totally fine with the rounding implicit in something like this).

Note: I would prefer a C library, but I am OK with solutions for nearly any language as I can probably find appropriate bindings.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T15:20:58+00:00Added an answer on May 21, 2026 at 3:20 pm

    It is really two things: 1) the data encompassing the conversion, 2) the presentation of the conversion.

    The second is user choice: If you want fractions, you need to write or get a fractions library. There are many.

    The first is fairly easy. The vast majority of conversions are just a factor. Usually you will organize known factors into a conversion into the appropriate SI unit for that type of conversion (volume, length, area, density, etc.)

    Your data then looks something like this:

    A   acres   4.046870000000000E+03   6
    A   ares    1.000000000000000E+02   15
    A   barns   1.000000000000000E-28   15
    A   centiares   1.000000000000000E+00   15
    A   darcys  9.869230000000000E-13   6
    A   doors   9.290340000000000E+24   6
    A   ferrados    7.168458781362010E-01   6
    A   hectares    1.000000000000000E+04   15
    A   labors  7.168625518000000E+05   6
    A   Rhode Island    3.144260000000000E+09   4
    A   sections    2.590000000000000E+06   6
    A   sheds   1.000000000000000E-48   15
    A   square centimeters  1.000000000000000E-04   15
    A   square chains (Gunter's or surveyor's)  4.046860000000000E+02   6
    A   square chains (Ramsden's)   9.290304000000000E+02   5
    A   square feet 9.290340000000000E-02   6
    A   square inches   6.451600000000000E-04   15
    A   square kilometers   1.000000000000000E+06   15
    A   square links (Gunter's or surveyor's)   4.046900000000000E-02   5
    A   square meters (SI)  1.000000000000000E+00   15
    A   square miles (statute)  2.590000000000000E+06   7
    A   square millimeter   1.000000000000000E-06   15
    A   square mils 6.451610000000000E-10   5
    A   square perches  2.529300000000000E+01   5
    A   square poles    2.529300000000000E+01   5
    A   square rods 2.529300000000000E+01   5
    A   square yards    8.361270000000000E-01   6
    A   townships   9.324009324009320E+07   5
    

    In each case, these are area conversions into the SI unit for area — square meters. Then make a second conversion into the the desired conversion. The third number there is significant digits.

    Keep a file of these for the desired factors and then you can convert from any area to any area that you have data on. Repeat for other categories of conversion (Volume, Power, Length, Weight, etc etc etc)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ideally I want a function something like the following (this example doesn't compile): void
Ideally, I'd like a module or library that doesn't require superuser access to install;
Using OCUnit & Xcode, is there a way of running just one test? Ideally,
Trying to make a simple program to catalogue books. Something like this, for example:
Any recommendations on grep tools for Windows? Ideally ones that could leverage 64-bit OS.
Ideally I'd like a way to enable the mouse wheel for scrolling in old
Ideally something that will work with Oracle, MS SQL Server, MySQL and Posgress.
Ideally, something cross-platform.
Ideally I'd like to be able to create the views in Interface Builder and
Ideally something I can plug and play pretty readily an quickly that supports GeoCoding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.