Re: [netmod] Question on YANG 'fraction-digit' statement

"Ivory, William" <william.ivory@intl.att.com> Thu, 19 December 2019 11:28 UTC

Return-Path: <william.ivory@intl.att.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D5991200B5 for <netmod@ietfa.amsl.com>; Thu, 19 Dec 2019 03:28:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sslifTcZH-uU for <netmod@ietfa.amsl.com>; Thu, 19 Dec 2019 03:28:20 -0800 (PST)
Received: from mx0a-00191d01.pphosted.com (mx0a-00191d01.pphosted.com [67.231.149.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0C5811200B4 for <netmod@ietf.org>; Thu, 19 Dec 2019 03:28:19 -0800 (PST)
Received: from pps.filterd (m0053301.ppops.net [127.0.0.1]) by mx0a-00191d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBJBPRjk048051; Thu, 19 Dec 2019 06:28:19 -0500
Received: from alpi155.enaf.aldc.att.com (sbcsmtp7.sbc.com [144.160.229.24]) by mx0a-00191d01.pphosted.com with ESMTP id 2wyr8f1r61-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 06:28:19 -0500
Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id xBJBSIdG005807; Thu, 19 Dec 2019 06:28:18 -0500
Received: from zlp27126.vci.att.com (zlp27126.vci.att.com [135.66.87.47]) by alpi155.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id xBJBSA5W005723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Dec 2019 06:28:11 -0500
Received: from zlp27126.vci.att.com (zlp27126.vci.att.com [127.0.0.1]) by zlp27126.vci.att.com (Service) with ESMTP id F04594014786; Thu, 19 Dec 2019 11:28:09 +0000 (GMT)
Received: from gbcdcmbx17.intl.att.com (unknown [135.76.180.53]) by zlp27126.vci.att.com (Service) with ESMTPS id A54B74014783; Thu, 19 Dec 2019 11:28:09 +0000 (GMT)
Received: from gbcdcmbx15.intl.att.com (135.76.180.51) by gbcdcmbx17.intl.att.com (135.76.180.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1847.3; Thu, 19 Dec 2019 11:28:07 +0000
Received: from gbcdcmbx15.intl.att.com ([fe80::f44d:965d:2bf3:fe97]) by gbcdcmbx15.intl.att.com ([fe80::f44d:965d:2bf3:fe97%5]) with mapi id 15.01.1847.003; Thu, 19 Dec 2019 11:28:07 +0000
From: "Ivory, William" <william.ivory@intl.att.com>
To: "mbj@tail-f.com" <mbj@tail-f.com>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Question on YANG 'fraction-digit' statement
Thread-Index: AQHVtk5980L42rO4hUGIVihpIsgUyKfBT/0AgAACKgA=
Date: Thu, 19 Dec 2019 11:28:07 +0000
Message-ID: <6f85a0004dc5cd0cc138877aa9b089a331de37ed.camel@intl.att.com>
References: <af85620369afc261221dae869f59052efcdeb290.camel@intl.att.com> <20191219.122022.2127262858367842315.mbj@tail-f.com>
In-Reply-To: <20191219.122022.2127262858367842315.mbj@tail-f.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Evolution 3.28.5-0ubuntu0.18.04.1
x-originating-ip: [135.76.168.250]
Content-Type: multipart/alternative; boundary="_000_6f85a0004dc5cd0cc138877aa9b089a331de37edcamelintlattcom_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-19_01:2019-12-17,2019-12-19 signatures=0
X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 mlxscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 clxscore=1015 phishscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=537 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912190099
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/qbN4ylR2SCNndfANag-fR_LX2q0>
Subject: Re: [netmod] Question on YANG 'fraction-digit' statement
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Dec 2019 11:28:21 -0000

Hi Martin,

Thanks - yes, that makes sense.

William

On Thu, 2019-12-19 at 12:20 +0100, Martin Bjorklund wrote:

Hi,


"Ivory, William" <william.ivory@intl.att.com<mailto:william.ivory@intl.att.com>> wrote:

Hi,


I've got a question about the 'fraction-digit' statement which I'm

hoping someone can clarify. I know it is used to specify the range of

valid values, as shown (in part) in the table below:



     +----------------+-----------------------+----------------------+

     | fraction-digit | min                   | max                  |

     +----------------+-----------------------+----------------------+

     | 1              | -922337203685477580.8 | 922337203685477580.7 |

     | 2              | -92233720368547758.08 | 92233720368547758.07 |

     | 3              | -9223372036854775.808 | 9223372036854775.807 |




My question is whether it implicitly imposes any restriction on the

number of digits that can follow the decimal point for a valid value,

ie for 'fraction-digits 2', is 123.45678 valid, or only 123.45?


If fraction-digits is 2, it means, according to section 9.3 in RFC

7950, that the value space consists of the real numbers that are

expressible as "i x 10^-2", where "i" is a 64-bit integer.  123.45678

cannot be expressed in this way, which means that it is not a valid

value for this type.



/martin