Home DFS SB OD SDN

Notice: How To Tip The Webmaster.


You are at the section Calendar History

Truncating Answers

To Use Integer Portions of the Answers

For computer programmers using PowerBasic, use the INT() function like this:

answer1 = INT(answer)

26 = INT(26.4)

-2 = INT(-1.1) (NOTE: The Integer function rounds down to the previous integer, since -1.1 is greater than -2, the answer is -2, not -1, since -1 is greater than -1.1.)

To Use Decimal Portions of the Answers

For computer programmers using PowerBasic, use the FRAC() function for floating-point numbers (not integers). The numbers can be single, double, or extended precision variables. It can also be used for negative numbers. Caution: It doesn't quite give you the correct answer if you use SINGLE precision. You must use DOUBLE precision numbers to get the correct decimal answer (variable# instead of variable!)

answer1 = FRAC(answer)

FRAC(2.6) = .6

FRAC(-2.6) = -.6

For those who don't have a FRAC() function, here's how to get the decimal portion of the answer. You lose the sign so you end up with a decimal part of the answer.

answer1 = ABS(answer) - INT(ABS(answer))

ABS(2.6) - INT(ABS(2.6)) = .6 (2.6 - 2)

ABS(-2.6) - INT(ABS(-2.6)) = .6 (2.6 - 2)

To get the positive offset of the decimal portion of the previous integer, use this formula:

answer1 = answer - INT(answer)

2.6 - INT(2.6) = .6 (2.6 - 2)

-2.6 - INT(-2.6) = .4 (-2.6 + 3)

Menu:
Calendar History Main Page Calendar 1: The Romulus Calendar I Calendar 2: The Republican Calendar I Calendar 3: The Republican Calendar II Calendar 4: The Republican Transitional Calendar Calendar 5: The Julian-Roman-Actual-1 Calendar Calendar 6: The Julian-Roman-Transitional-1 Calendar Calendar 7: The Julian-Roman-1 Calendar Calendar 8: The Julian-Kalends-1 Calendar Calendar 9: The Julian-1 Calendar Calendar 10: The Gregorian Calendar Dual Dating Date Confusion Definition of Days on the Calendars Definition of Calendars: Others Old, New and Unknown Styles Leap Year Error on the Julian-Roman-Actual-1 Calendar What Calendars Each Country Was Using Gregorian-Julian Differences By Century New Years Days Addenda Day and Year Measurements Calendar Varieties-Gregorian Calendar Varieties-Julian Calendar Varieties-Other Years Converted From Julian Period Day Lining Up Julian Dates Between Earth and Mars The Martian Calendar of Earth Converting From the Julian Period Date Creating a Julian Period Day Database File Truncating Answers Conversion Between Julian-1 and Gregorian Calendars Create a Calendar Leap Year Day Comparisons Swedish Calendar 1700-1712 Fractions of Years, Etc.
Related:
Dave's Fun Stuff's Stuff Green Concepts Jesus' Date of Conception Calendar Coincidence Calendar History Units of Time Food to Lower Blood Pressure Fun With Money Electricity Rates Optical Illusions Celebrity Autographs Eat More Potassium! TV Died State Abbreviations Volume Measurements The 21 Factory Fun With Math Strip Unicode Mesa Silicon Cajon
Market Zone:
Dave's Fun Stuff
TV Zone:
Find your favorite TV shows with "Let's Watch TV!"
Notable:
Dave's Fun Stuff SDN Media News and More
Footer:
Dave's Fun Stuff Super Birthdays Contact Webmaster



© 1995-2023. davesfunstuff.com. All Rights Reserved. Reproduction of any part of this website without expressed written consent is prohibited.

Help Support Our Ad-Free Web Section

Just use our PayPal link to pay.

Please Donate Cash to help pay for webhosting, domain payments, expenses and labor in keeping this section going. Thank you.

$2, $5, $10, $20, $50, $75, $100, $ANY

Notice Of Disclosure (updated June 2023):

"David Tanny is the owner and operator of the domains davesfunstuff.com and davidtanny.com"

Website Cookie Policy