Click here to Skip to main content
15,886,077 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: How stupid can these guys get? Pin
Gerry Schmitz12-Jan-21 13:53
mveGerry Schmitz12-Jan-21 13:53 
GeneralC# Decimal Arithmetic Pin
Gerry Schmitz12-Jan-21 9:41
mveGerry Schmitz12-Jan-21 9:41 
GeneralRe: C# Decimal Arithmetic Pin
harold aptroot12-Jan-21 10:00
harold aptroot12-Jan-21 10:00 
GeneralRe: C# Decimal Arithmetic Pin
Gerry Schmitz12-Jan-21 13:37
mveGerry Schmitz12-Jan-21 13:37 
GeneralRe: C# Decimal Arithmetic Pin
PIEBALDconsult12-Jan-21 10:20
mvePIEBALDconsult12-Jan-21 10:20 
GeneralRe: C# Decimal Arithmetic Pin
trønderen12-Jan-21 11:42
trønderen12-Jan-21 11:42 
GeneralRe: C# Decimal Arithmetic Pin
Gerry Schmitz12-Jan-21 13:46
mveGerry Schmitz12-Jan-21 13:46 
GeneralRe: C# Decimal Arithmetic Pin
trønderen12-Jan-21 15:09
trønderen12-Jan-21 15:09 
If the divisor in theory, mathematically, "should have been" zero but isn't because of imprecision as floats are not 'real' numbers of unlimited precision, then the underlaying algorithm should indeed be closely inspected and investigated.

If the avoidance of a divide by zero exception is an artifact of limited precision, then I am getting close to call that a faulty implementation of the algorithm.

If, on the other hand, the divisor is from a mathematical point of view - really non-zero, but has been zeroed by some software or hardware algorithmic rules, then these rules should be reconsidered. It should never be tolerated that a small, non-zero divisor causes a divide-by-zero error. That is simply incorrect! If the divisor is "valid", yet so small that it should be equivalent to zero, then it must be handled as a value (like zero), not causing an exception. If it could be handled in float format, it should be handled similarlu in decimal format!
GeneralRe: C# Decimal Arithmetic Pin
Gerry Schmitz12-Jan-21 17:16
mveGerry Schmitz12-Jan-21 17:16 
GeneralRe: C# Decimal Arithmetic Pin
trønderen12-Jan-21 17:46
trønderen12-Jan-21 17:46 
GeneralRe: C# Decimal Arithmetic Pin
Harrison Pratt13-Jan-21 5:45
professionalHarrison Pratt13-Jan-21 5:45 
GeneralRe: C# Decimal Arithmetic Pin
obermd13-Jan-21 5:37
obermd13-Jan-21 5:37 
GeneralRe: C# Decimal Arithmetic Pin
trønderen13-Jan-21 8:19
trønderen13-Jan-21 8:19 
GeneralRe: C# Decimal Arithmetic Pin
Richard Deeming12-Jan-21 21:41
mveRichard Deeming12-Jan-21 21:41 
GeneralRe: C# Decimal Arithmetic Pin
trønderen13-Jan-21 2:40
trønderen13-Jan-21 2:40 
GeneralRe: C# Decimal Arithmetic Pin
Super Lloyd12-Jan-21 20:26
Super Lloyd12-Jan-21 20:26 
GeneralRe: C# Decimal Arithmetic Pin
Daniel Pfeffer12-Jan-21 20:56
professionalDaniel Pfeffer12-Jan-21 20:56 
GeneralRe: C# Decimal Arithmetic Pin
Kiriander12-Jan-21 22:01
Kiriander12-Jan-21 22:01 
GeneralRe: C# Decimal Arithmetic Pin
trønderen13-Jan-21 3:26
trønderen13-Jan-21 3:26 
GeneralRe: C# Decimal Arithmetic Pin
BernardIE531713-Jan-21 7:02
BernardIE531713-Jan-21 7:02 
GeneralRe: C# Decimal Arithmetic Pin
trønderen13-Jan-21 7:40
trønderen13-Jan-21 7:40 
GeneralRe: C# Decimal Arithmetic Pin
BotReject18-Jan-21 3:59
BotReject18-Jan-21 3:59 
GeneralBacon jam Pin
Mike Hankey12-Jan-21 9:25
mveMike Hankey12-Jan-21 9:25 
GeneralRe: Bacon jam Pin
Greg Utas12-Jan-21 9:35
professionalGreg Utas12-Jan-21 9:35 
GeneralRe: Bacon jam Pin
trønderen13-Jan-21 3:35
trønderen13-Jan-21 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.