From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c81958079621fd4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-24 18:38:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!news-in-sanjose!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttln1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: <3BD70DE5.C2D2B6FD@ida.his.se> Subject: Re: Decimal number of interger? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 25 Oct 2001 01:38:40 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttln1.wa.home.com 1003973920 24.248.45.203 (Wed, 24 Oct 2001 18:38:40 PDT) NNTP-Posting-Date: Wed, 24 Oct 2001 18:38:40 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:15158 Date: 2001-10-25T01:38:40+00:00 List-Id: I would use something like: IF Abs( log2(width-1) - Float'Truncation( log2(width - 1) ) ) < someMinDelta THEN ... where "someMinDelta" gives an indication of how close is close enough. SteveD wrote in message news:3BD70DE5.C2D2B6FD@ida.his.se... > Hi! > How do I determine weather the result from a function has a decimal part > or not? > I want to use the log function to se weather the width of the terrain is > (2^x)+1. In order to do this I want to use the following: > log2(width-1) = "float without decimal part" > > > Thanks in advance! > /Michael Andersson >