# Printing plaintext polynomial coefficients vs message vector slots

**URL:** <https://openfhe.discourse.group/t/printing-plaintext-polynomial-coefficients-vs-message-vector-slots/1498>\
**Category:** Library Questions\
**Tags:** questions\
**Created:** [August 15, 2024, 3:39pm UTC](https://openfhe.discourse.group/t/printing-plaintext-polynomial-coefficients-vs-message-vector-slots/1498 "2024-08-15T15:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seyda](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/seyda/32/397_2.png) [@seyda](https://openfhe.discourse.group/u/seyda)\
**Post date:** [August 15, 2024, 3:39pm UTC](https://openfhe.discourse.group/t/printing-plaintext-polynomial-coefficients-vs-message-vector-slots/1498/1 "2024-08-15T15:39:09Z")

</div>

Hello! To understand the canonical embedding and the scale and round procedures in CKKS encoding [[CKKS17](https://eprint.iacr.org/2016/421.pdf)], I was trying to print the plaintext polynomial coefficients (in R = Z(X)/(X^N+1)), but could only print the message vector (in C^(N/2)).  
Please refer to the following lines:

```auto
    CCParams<CryptoContextCKKSRNS> parameters;
    CryptoContext<DCRTPoly> cc = GenCryptoContext(parameters);

    vector<double> x1 = {-4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0};;
    Plaintext pt1 = cc->MakeCKKSPackedPlaintext(x1);

    cout << "Plaintext pt1: " << endl << pt1 << endl;
    cout << "CKKS Packed Values" << endl << pt1->GetCKKSPackedValue() << endl;

```

and the output is:

```auto
Plaintext pt1: 
(-4, -3, -2, -1, 0, 1, 2, 3, 4, ... ); Estimated precision: 59 bits

CKKS Packed Values
[(-4,0) (-3,0) (-2,0) (-1,0) (0,0) (1,0) (2,0) (3,0) (4,0)]

```

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [August 15, 2024, 3:53pm UTC](https://openfhe.discourse.group/t/printing-plaintext-polynomial-coefficients-vs-message-vector-slots/1498/2 "2024-08-15T15:53:21Z")

</div>

You can print the plaintext as a DCRTPoly element as follows:

> `std::cout << "pt1 DCRTPoly: " << pt1 ->GetElement<DCRTPoly>() << std::endl;`
