Skip to content

Commit 62abb03

Browse files
committed
Change 5e0 to 5.0, for consistency.
1 parent 220e6bf commit 62abb03

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

src/backend/utils/adt/date.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.111 2005/07/10 21:13:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.112 2005/07/12 15:17:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -946,9 +946,9 @@ time2tm(TimeADT time, struct pg_tm * tm, fsec_t *fsec)
946946
double trem;
947947

948948
trem = time;
949-
TMODULO(trem, tm->tm_hour, 3600e0);
950-
TMODULO(trem, tm->tm_min, 60e0);
951-
TMODULO(trem, tm->tm_sec, 1e0);
949+
TMODULO(trem, tm->tm_hour, 3600.0);
950+
TMODULO(trem, tm->tm_min, 60.0);
951+
TMODULO(trem, tm->tm_sec, 1.0);
952952
*fsec = trem;
953953
#endif
954954

@@ -1683,7 +1683,7 @@ time_part(PG_FUNCTION_ARGS)
16831683
else if (type == RESERV && val == DTK_EPOCH)
16841684
{
16851685
#ifdef HAVE_INT64_TIMESTAMP
1686-
result = (time / 1000000e0);
1686+
result = (time / 1000000.0);
16871687
#else
16881688
result = time;
16891689
#endif
@@ -1841,9 +1841,9 @@ timetz2tm(TimeTzADT *time, struct pg_tm * tm, fsec_t *fsec, int *tzp)
18411841
#else
18421842
double trem = time->time;
18431843

1844-
TMODULO(trem, tm->tm_hour, 3600e0);
1845-
TMODULO(trem, tm->tm_min, 60e0);
1846-
TMODULO(trem, tm->tm_sec, 1e0);
1844+
TMODULO(trem, tm->tm_hour, 3600.0);
1845+
TMODULO(trem, tm->tm_min, 60.0);
1846+
TMODULO(trem, tm->tm_sec, 1.0);
18471847
*fsec = trem;
18481848
#endif
18491849

@@ -2398,12 +2398,12 @@ timetz_part(PG_FUNCTION_ARGS)
23982398
case DTK_TZ_MINUTE:
23992399
result = -tz;
24002400
result /= 60;
2401-
FMODULO(result, dummy, 60e0);
2401+
FMODULO(result, dummy, 60.0);
24022402
break;
24032403

24042404
case DTK_TZ_HOUR:
24052405
dummy = -tz;
2406-
FMODULO(dummy, result, 3600e0);
2406+
FMODULO(dummy, result, 3600.0);
24072407
break;
24082408

24092409
case DTK_MICROSEC:
@@ -2458,7 +2458,7 @@ timetz_part(PG_FUNCTION_ARGS)
24582458
else if (type == RESERV && val == DTK_EPOCH)
24592459
{
24602460
#ifdef HAVE_INT64_TIMESTAMP
2461-
result = time->time / 1000000e0 + time->zone;
2461+
result = time->time / 1000000.0 + time->zone;
24622462
#else
24632463
result = time->time + time->zone;
24642464
#endif

src/backend/utils/adt/datetime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.151 2005/06/29 22:51:56 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.152 2005/07/12 15:17:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3278,7 +3278,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct pg_tm * tm,
32783278
sec = (*fsec / USECS_PER_SEC);
32793279
*fsec -= (sec * USECS_PER_SEC);
32803280
#else
3281-
TMODULO(*fsec, sec, 1e0);
3281+
TMODULO(*fsec, sec, 1.0);
32823282
#endif
32833283
tm->tm_sec += sec;
32843284
}

src/backend/utils/adt/timestamp.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.130 2005/07/10 21:13:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.131 2005/07/12 15:17:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1241,9 +1241,9 @@ interval2tm(Interval span, struct pg_tm * tm, fsec_t *fsec)
12411241
*fsec = (time - (tm->tm_sec * USECS_PER_SEC));
12421242
#else
12431243
TMODULO(time, tm->tm_mday, (double)SECS_PER_DAY);
1244-
TMODULO(time, tm->tm_hour, 3600e0);
1245-
TMODULO(time, tm->tm_min, 60e0);
1246-
TMODULO(time, tm->tm_sec, 1e0);
1244+
TMODULO(time, tm->tm_hour, 3600.0);
1245+
TMODULO(time, tm->tm_min, 60.0);
1246+
TMODULO(time, tm->tm_sec, 1.0);
12471247
*fsec = time;
12481248
#endif
12491249

@@ -3330,23 +3330,23 @@ timestamp_part(PG_FUNCTION_ARGS)
33303330
{
33313331
case DTK_MICROSEC:
33323332
#ifdef HAVE_INT64_TIMESTAMP
3333-
result = tm->tm_sec * 1000000e0 + fsec;
3333+
result = tm->tm_sec * 1000000.0 + fsec;
33343334
#else
33353335
result = (tm->tm_sec + fsec) * 1000000;
33363336
#endif
33373337
break;
33383338

33393339
case DTK_MILLISEC:
33403340
#ifdef HAVE_INT64_TIMESTAMP
3341-
result = tm->tm_sec * 1000e0 + fsec / 1000e0;
3341+
result = tm->tm_sec * 1000.0 + fsec / 1000.0;
33423342
#else
33433343
result = (tm->tm_sec + fsec) * 1000;
33443344
#endif
33453345
break;
33463346

33473347
case DTK_SECOND:
33483348
#ifdef HAVE_INT64_TIMESTAMP
3349-
result = tm->tm_sec + fsec / 1000000e0;
3349+
result = tm->tm_sec + fsec / 1000000.0;
33503350
#else
33513351
result = tm->tm_sec + fsec;
33523352
#endif
@@ -3424,7 +3424,7 @@ timestamp_part(PG_FUNCTION_ARGS)
34243424
result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday);
34253425
#ifdef HAVE_INT64_TIMESTAMP
34263426
result += ((((tm->tm_hour * 60) + tm->tm_min) * 60) +
3427-
tm->tm_sec + (fsec / 1000000e0)) / (double)SECS_PER_DAY;
3427+
tm->tm_sec + (fsec / 1000000.0)) / (double)SECS_PER_DAY;
34283428
#else
34293429
result += ((((tm->tm_hour * 60) + tm->tm_min) * 60) +
34303430
tm->tm_sec + fsec) / (double)SECS_PER_DAY;
@@ -3468,7 +3468,7 @@ timestamp_part(PG_FUNCTION_ARGS)
34683468
errmsg("timestamp out of range")));
34693469

34703470
#ifdef HAVE_INT64_TIMESTAMP
3471-
result = (timestamptz - SetEpochTimestamp()) / 1000000e0;
3471+
result = (timestamptz - SetEpochTimestamp()) / 1000000.0;
34723472
#else
34733473
result = timestamptz - SetEpochTimestamp();
34743474
#endif
@@ -3560,33 +3560,33 @@ timestamptz_part(PG_FUNCTION_ARGS)
35603560
case DTK_TZ_MINUTE:
35613561
result = -tz;
35623562
result /= 60;
3563-
FMODULO(result, dummy, 60e0);
3563+
FMODULO(result, dummy, 60.0);
35643564
break;
35653565

35663566
case DTK_TZ_HOUR:
35673567
dummy = -tz;
3568-
FMODULO(dummy, result, 3600e0);
3568+
FMODULO(dummy, result, 3600.0);
35693569
break;
35703570

35713571
case DTK_MICROSEC:
35723572
#ifdef HAVE_INT64_TIMESTAMP
3573-
result = tm->tm_sec * 1000000e0 + fsec;
3573+
result = tm->tm_sec * 1000000.0 + fsec;
35743574
#else
35753575
result = (tm->tm_sec + fsec) * 1000000;
35763576
#endif
35773577
break;
35783578

35793579
case DTK_MILLISEC:
35803580
#ifdef HAVE_INT64_TIMESTAMP
3581-
result = tm->tm_sec * 1000e0 + fsec / 1000e0;
3581+
result = tm->tm_sec * 1000.0 + fsec / 1000.0;
35823582
#else
35833583
result = (tm->tm_sec + fsec) * 1000;
35843584
#endif
35853585
break;
35863586

35873587
case DTK_SECOND:
35883588
#ifdef HAVE_INT64_TIMESTAMP
3589-
result = tm->tm_sec + fsec / 1000000e0;
3589+
result = tm->tm_sec + fsec / 1000000.0;
35903590
#else
35913591
result = tm->tm_sec + fsec;
35923592
#endif
@@ -3652,7 +3652,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
36523652
result = date2j(tm->tm_year, tm->tm_mon, tm->tm_mday);
36533653
#ifdef HAVE_INT64_TIMESTAMP
36543654
result += ((((tm->tm_hour * 60) + tm->tm_min) * 60) +
3655-
tm->tm_sec + (fsec / 1000000e0)) / (double)SECS_PER_DAY;
3655+
tm->tm_sec + (fsec / 1000000.0)) / (double)SECS_PER_DAY;
36563656
#else
36573657
result += ((((tm->tm_hour * 60) + tm->tm_min) * 60) +
36583658
tm->tm_sec + fsec) / (double)SECS_PER_DAY;
@@ -3674,7 +3674,7 @@ timestamptz_part(PG_FUNCTION_ARGS)
36743674
{
36753675
case DTK_EPOCH:
36763676
#ifdef HAVE_INT64_TIMESTAMP
3677-
result = (timestamp - SetEpochTimestamp()) /1000000e0;
3677+
result = (timestamp - SetEpochTimestamp()) /1000000.0;
36783678
#else
36793679
result = timestamp - SetEpochTimestamp();
36803680
#endif
@@ -3751,23 +3751,23 @@ interval_part(PG_FUNCTION_ARGS)
37513751
{
37523752
case DTK_MICROSEC:
37533753
#ifdef HAVE_INT64_TIMESTAMP
3754-
result = tm->tm_sec * 1000000e0 + fsec;
3754+
result = tm->tm_sec * 1000000.0 + fsec;
37553755
#else
37563756
result = (tm->tm_sec + fsec) * 1000000;
37573757
#endif
37583758
break;
37593759

37603760
case DTK_MILLISEC:
37613761
#ifdef HAVE_INT64_TIMESTAMP
3762-
result = tm->tm_sec * 1000e0 + fsec / 1000e0;
3762+
result = tm->tm_sec * 1000.0 + fsec / 1000.0;
37633763
#else
37643764
result = (tm->tm_sec + fsec) * 1000;
37653765
#endif
37663766
break;
37673767

37683768
case DTK_SECOND:
37693769
#ifdef HAVE_INT64_TIMESTAMP
3770-
result = tm->tm_sec + fsec / 1000000e0;
3770+
result = tm->tm_sec + fsec / 1000000.0;
37713771
#else
37723772
result = tm->tm_sec + fsec;
37733773
#endif
@@ -3831,7 +3831,7 @@ interval_part(PG_FUNCTION_ARGS)
38313831
else if (type == RESERV && val == DTK_EPOCH)
38323832
{
38333833
#ifdef HAVE_INT64_TIMESTAMP
3834-
result = interval->time / 1000000e0;
3834+
result = interval->time / 1000000.0;
38353835
#else
38363836
result = interval->time;
38373837
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy