• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mod (%) function in C/Objective-C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mod (%) function in C/Objective-C?


  • Subject: Re: Mod (%) function in C/Objective-C?
  • From: Keary Suska <email@hidden>
  • Date: Tue, 12 Aug 2014 18:38:09 -0600

On Aug 12, 2014, at 10:17 AM, Dave <email@hidden> wrote:

>
> On 12 Aug 2014, at 17:11, Scott Ribe <email@hidden> wrote:
>
>> On Aug 12, 2014, at 10:01 AM, Dave <email@hidden> wrote:
>>
>>> I’m not sure what you mean by dividing by a negative number is undefined?
>>
>> It sure as hell better be defined, hadn't it? We wouldn't want a language where the basic math ops were that foobar'd!
>>
>> Now in K&R C, the direction of truncation was undefined for division with negative integers, but C99 fixed that.
>>
>
> Yes, I saw that from the digging I did, I think that’s what he meant.

Yes, that--I didn't realize that C99 fixed that as well. I just figured reasonable compilers handled it reasonably ;-) Although I thought there was still some issue with modulus implementations, but I don't recall exactly. Probably also old information.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Mod (%) function in C/Objective-C? (From: Dave <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Keary Suska <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Keary Suska <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Dave <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Keary Suska <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Dave <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Scott Ribe <email@hidden>)
 >Re: Mod (%) function in C/Objective-C? (From: Dave <email@hidden>)

  • Prev by Date: Re: NSMenu in NSTableView column
  • Next by Date: Re: NSSpellChecker exception
  • Previous by thread: Re: Mod (%) function in C/Objective-C?
  • Next by thread: Re: Advise on referencing NSDocument from custom view
  • Index(es):
    • Date
    • Thread